Quería incorporar un botón de Logín y buscando me tope con uno: http://www.sanwebe.com/2013/01/40-css-buttons-from-codepen Es el que se llama "Facebook Login Button". Pero al copiar el código no me funciona, quizá sea algún fallo tonto (estoy empezando en html y css). Tengo mi archivo html con el css y el js externos. Aquí os los dejo tal cual están, a ver si conseguís ver en qué estoy fallando:
(Mis tres archivos se llaman "indice")
ARCHIVO HTML:
Código
<!DOCTYPE html> <html lang="es"> <head> <meta charset="iso-8859-1"> <link rel="stylesheet" type="text/css" href="indice.css"> </head> <body> <div class="block"> <div class="btn-fb-login"> </div> <div class="fb-login"> <div class="login-form"> <form method="post"> <input type="text" placeholder="E-mail" /> <input type="password" placeholder="Password" /> </form> </div> </div> </div> </body> </html>
ARCHIVO CSS:
Código
html { background: url(http://s.cdpn.io/6035/fb_login_bg.png) repeat; } body { font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; font-weight: 300; } .block { width: 175px; margin: 50px auto; } .btn-fb-login { width: 100%; height: 30px; border: 1px solid rgba(0,0,0,0.3); border-radius: 4px; @include background-image(linear-gradient(top, rgba(72,107,181,1) 0%,rgba(51,78,135,1) 100%)); box-shadow: inset 0 1px 3px rgba(255,255,255,0.2); cursor: pointer; &:hover { @include background-image(linear-gradient(top, rgba(72,107,181,1) 0%,rgba(35,59,108,1) 100%)); } .icon { background: url(http://s.cdpn.io/6035/fb_login_sprite.png) no-repeat; width: 11px; height: 22px; display: inline-block; float: left; margin: 3px 10px; } .title { font-size: (13/16) +em; color: #fff; line-height: 30px; float: left; padding: 0 10px; text-shadow: -1px -1px 1px rgba(0,0,0,0.5); box-shadow: -1px 0 0 rgba(255,255,255,0.1) ; border-left: 1px solid rgba(0,0,0,0.3); } } .fb-login { display: none; width: 100%; margin-top: 20px; border: 1px solid rgba(0,0,0,0.3); border-radius: 4px; @include background-image(linear-gradient(top, rgba(72,107,181,1) 0%,rgba(51,78,135,1) 100%)); box-shadow: inset 0 1px 3px rgba(255,255,255,0.2), 0 0 25px rgba(0,0,0,0.3); .login-form { width: 155px; margin: 10px; } .title { font-size: (14/16) +em; color: #fff; text-shadow: -1px -1px 1px rgba(0,0,0,0.5); text-align: center; padding: 10px 0; margin: 0 0 10px 0; } input[type=text], input[type=password] { width: 100%; height: 30px; margin: 0 0 10px; padding: 0 5px; display: inline-block; background: rgba(0,0,0,0.1); border: 1px solid rgba(0,0,0,0.3); border-radius: 3px; box-sizing: border-box; box-shadow: inset 0 1px 3px rgba(40,40,40,0.3), 0 1px 0 rgba(255,255,255,0.1); font-size: (11/16) +em; color: #fff; outline: none; text-shadow: 1px 1px 1px rgba(0,0,0,0.4); transition: background 0.3s ease; &:focus { background: rgba(0,0,0,0.03); } } .btn { width: 100%; height: 30px; border: 1px solid rgba(0,0,0,0.5); border-radius: 4px; @include background-image(linear-gradient(top, rgba(100,134,207,1) 0%,rgba(74,107,175,1) 100%)); box-shadow: inset 0 1px 2px rgba(255,255,255,0.3), 0 1px 1px rgba(0,0,0,0.1); color: #fff; font-size: (12/16) +em; text-shadow: -1px -1px 1px rgba(0,0,0,0.4); &:hover { @include background-image(linear-gradient(top, rgba(100,134,207,1) 0%,rgba(59,90,153,1) 100%)); } &:active { box-shadow: inset 0 0 4px rgba(0,0,0,0.4); background: #35518d; } } }
ARCHIVO javascript:
Código
$('.btn-fb-login').on('click',function(){ $(this).fadeOut(function(){ $('.fb-login').fadeIn(); }); });
El Resultado que me muestra es este:

Como siempre muchas gracias




