Skip to content

Instantly share code, notes, and snippets.

@Frankie-666
Created July 3, 2016 14:57
Show Gist options
  • Save Frankie-666/13c3414d26d51b50a1480ddcb540b572 to your computer and use it in GitHub Desktop.
Save Frankie-666/13c3414d26d51b50a1480ddcb540b572 to your computer and use it in GitHub Desktop.
Login
<form action="">
<h2><span class="entypo-login"></span> Login</h2>
<button class="submit"><span class="entypo-lock"></span></button>
<span class="entypo-user inputUserIcon"></span>
<input type="text" class="user" placeholder="ursername"/>
<span class="entypo-key inputPassIcon"></span>
<input type="password" class="pass"placeholder="password"/>
</form>
$(".user").focusin(function(){
$(".inputUserIcon").css("color", "#e74c3c");
}).focusout(function(){
$(".inputUserIcon").css("color", "white");
});
$(".pass").focusin(function(){
$(".inputPassIcon").css("color", "#e74c3c");
}).focusout(function(){
$(".inputPassIcon").css("color", "white");
});
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
@import url(http://weloveiconfonts.com/api/?family=entypo);
@import url(http://fonts.googleapis.com/css?family=Roboto);
/* zocial */
[class*="entypo-"]:before {
font-family: 'entypo', sans-serif;
}
*,
*:before,
*:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
h2 {
color:rgba(255,255,255,.8);
margin-left:12px;
}
body {
background: #272125;
font-family: 'Roboto', sans-serif;
}
form {
position:relative;
margin: 50px auto;
width: 380px;
height: auto;
}
input {
padding: 16px;
border-radius:7px;
border:0px;
background: rgba(255,255,255,.2);
display: block;
margin: 15px;
width: 300px;
color:white;
font-size:18px;
height: 54px;
}
input:focus {
outline-color: rgba(0,0,0,0);
background: rgba(255,255,255,.95);
color: #e74c3c;
}
button {
float:right;
height: 121px;
width: 50px;
border: 0px;
background: #e74c3c;
border-radius:7px;
padding: 10px;
color:white;
font-size:22px;
}
.inputUserIcon {
position:absolute;
top:68px;
right: 80px;
color:white;
}
.inputPassIcon {
position:absolute;
top:136px;
right: 80px;
color:white;
}
input::-webkit-input-placeholder {
color: white;
}
input:focus::-webkit-input-placeholder {
color: #e74c3c;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment