I designed a simple and interesting login box feature with Gravatar avatar that was exported from gravatar.com based on the message ID. This article is very basic on the level of CSS implementation and a few lines of jquery and PHP code. I hope this login box design gives some special flavor to your Web project. Before attempting this example, please upload your avatar on Gravatar.
498) this.width=498; ' OnMouseWheel = ' javascript:return big (This) ' title= ' use PHP, jquery and CSS to make Gravatar Avatar login window "height=" "alt=" uses PHP, jquery and CSS to make Gravatar Avatar login window "src=" https://lh3.googleusercontent.com/-RFUV0LFAAbo/T7vN5VAW8tI/ Aaaaaaaagcu/w8cbvtfpbko/s550/loginbox.png "width=" 550 "/>
Create Gravatar Avatar Login windows using PHP, jquery and CSS
Javascript
Contains JavaScript code. $ (". User"). KeyUp (function () {}---User is the name of the input tag, we get the value of input by $ (this). Val (). If the e-mail value passes the regular expression, Ajax will request avatar.php
-
498) this.width=498; ' OnMouseWheel = ' javascript:return big (This) ' title= ' use PHP, jquery and CSS to make Gravatar Avatar login window "height=" 322 "alt=" uses PHP, jquery and CSS to make Gravatar Avatar login window "src=" https://lh6.googleusercontent.com/-S5T-tywC_QU/T7vffdMlKHI/ Aaaaaaaagck/fz445g_qady/s368/wire.png "width=" 368 "/>
Create Gravatar Avatar Login windows using PHP, jquery and CSS
HTML Code
- < Div id="Login_container">
- < Div id="Login_box">
- < Div id="Img_box"><img src = "HTTP://WWW.GRAVATAR.COM/AVATAR/?D=MM" alt="" /> Div >
- <form Action="login.php" Method="POST"><input ID="username" class="Input User" type="Text" /> <input ID="Password" class="Input passcode" type="Password" /> <input class="BTN" type="Submit" value="Login" /> form> div >
- Div >
avatar.php
Here is a very simple code: Receive post email, do MD5 encryption, return the encrypted data.
- !--? php
- if ( $_post [ ' email ' ])
- {
- $ email = $_post [ ' email ' ];
- $lowercase = strtolower ( $email );
- $image = MD5 ( $lowercase );
- echo $image ;
- }
- ?>
Css
- #login _container
- {
- background : URL (blue. jpg) #006699 ;
- Overflow : Auto ;
- width : 300px ;
- }
- #login _box
- {
- padding : 60px 30px 30px 30px;
- Border : Solid 1px #dedede;
- width : 238px ;
- Background-color : #fcfcfc ;
- Margin-top : 70px ;
- }
- #img _box
- {
- Background-color : #FFFFFF ;
- Border : 1px solid #DEDEDE;
- Margin-left : 77px ;
- Margin-top : -108px ;
- position : Absolute ;
- width : 86px ;
- Height : 86px ;
- }
http://www.bkjia.com/PHPjc/445693.html www.bkjia.com true http://www.bkjia.com/PHPjc/445693.html techarticle I designed a simple and interesting login box feature with Gravatar avatar that was exported from gravatar.com based on the message ID. This article is very basic on the level of CSS implementation and a few lines ...