Created
April 16, 2013 14:31
-
-
Save anonymous/5396378 to your computer and use it in GitHub Desktop.
A CodePen by Joey. Neat subscribe form. - I don't usually use jQuery, but for this. It was a must. - Hope you enjoy.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section> | |
<input placeholder="Enter your email"> | |
<a id="button" href="#">Subscribe</a> | |
<h1>happy subscribing</h1> | |
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#button').click(function(e){ | |
e.preventDefault(); | |
$("h1").animate({ | |
right: "0px", | |
}, 1000); | |
}); | |
//MAKE SURE YOU PRESS "SUBSCRIBE" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,700); | |
body { | |
background:url('http://goo.gl/Y5BfD') 0px -538px no-repeat black; | |
overflow:hidden; | |
} | |
h1 { | |
position:absolute; | |
width:100%; | |
top:50px; | |
right:-1000px; | |
color:white; | |
text-transform:uppercase; | |
font-family: 'Open Sans', sans-serif; | |
margin:0; | |
font-size:3em; | |
text-shadow:2px 2px 0px rgba(0, 0, 0, 0.4) | |
} | |
section { | |
width:450px; | |
margin:130px auto auto; | |
background:white; | |
box-shadow:0px 2px 0px rgba(0, 0, 0, 0.3); | |
border-radius:10px; | |
text-align:center; | |
padding:40px; | |
} | |
input { | |
width:260px; | |
padding:10px; | |
outline:none; | |
-webkit-border-top-left-radius: 6px; | |
-webkit-border-bottom-left-radius: 6px; | |
-moz-border-radius-topleft: 6px; | |
-moz-border-radius-bottomleft: 6px; | |
border-top-left-radius: 6px; | |
border-bottom-left-radius: 6px; | |
border:1px solid rgba(1, 1, 1, 0.3); | |
font-family: 'Open Sans', sans-serif; | |
font-size:1.5em; | |
color:black; | |
font-weight:800; | |
margin:0; | |
} | |
#button { | |
text-decoration:none; | |
padding:10px; | |
-webkit-border-top-right-radius: 6px; | |
-webkit-border-bottom-right-radius: 6px; | |
-moz-border-radius-topright: 6px; | |
-moz-border-radius-bottomright: 6px; | |
border-top-right-radius: 6px; | |
border-bottom-right-radius: 6px; | |
border-top:1px solid #b3b3b3; | |
border-bottom:1px solid #b3b3b3; | |
border-right:1px solid #b3b3b3; | |
border-left:1px solid ##b3b3b3; | |
outline:none; | |
color:white; | |
font-family: 'Open Sans', sans-serif; | |
font-size:1.5em; | |
font-weight:800; | |
margin-left:-4px; | |
text-shadow:1px 1px 1px rgba(0, 0, 0, 0.1); | |
background:#111; | |
} | |
#button:hover { | |
opacity:0.9; | |
} | |
#button:active { | |
opacity:1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment