Hola queridos lectores. A continuación les vengo a dar un regalo para sus blog y se trata de un sexy menú, usando la técnica de tooltip y animándolo con CSS3. Pueden ver su funcionamiento aquí abajo.
Agregar menú al blog.
Lo primero que debemos hacer es agregar el HTML al blog. Entrando en su plantilla buscan <body> agregando dentro de <body> en la sección que ustedes deseen donde se verá tu menú social. También deben reemplazar el # que se encuentra en href="#" por los enlaces de sus cuentas sociales, fíjense en el nombre de los class="nombredelclass" y van cambiando de acuerdo a eso el # por sus links.
Agregando estilos (CSS3):
Es el turno de los estilos, entonces buscarán en su plantilla ]]></b:skin> e insertarán el código CSS antes justo arriba:
}
.nav-tt{
padding: 50;
width: 70%;
height: 70px;
margin: 80px auto 30px auto;
}
.nav-tt li{
float: left;
list-style: none;
}
.nav-tt li a{
display: block;
width: 40px;
height: 40px;
margin: 0 2px;
outline: none;
position: relative;
z-index: 2;
text-indent: -9000px;
text-decoration: none;
}
.nav-tt li .gplus{
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisrzn6cBc4i0vpJ9b1BSzUarFYRLnK3SPGe-77AN8mvUkgLtxP6-IGWxkJmIXXAFSfyosbsNbUehQn5sOlcnJZFbcWTDUw3jRxWLr8ZyM_1MpFAxTmE6LeU6VljFSPhiCRHuoBfeeXa_qI/s128/google_plus.png) no-repeat;
}
.nav-tt li .twitter{
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiypo2Vp969yR4HyMjsI32-9ZfhD2Ui_OzX5KZqrdc7HKqpkzYgdCs304GrqNLGB-VWXW6HidgoBoAVdZYWfRJFRrWUFKOEVJQ5cbdodQCCmPJKNaGsklogzwK0MYDd73OXKDW0Y_4niAF/s128/twitter_1.png) no-repeat;
}
.nav-tt li .pinterest{
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOZt3SrwovolW7zRDir85XMrKkfuTYp_Rht-9DFSPKGbOUEDF1M6qy1m2l-HJ_oNhCK4z_ZlVixr7FfjpaScNiL4X2xsua_RdWQk_WXokPIEKVMQSujUsJob-4bkFc28Xo4_GZlxYozUVW/s128/pinterest.png) no-repeat;
}
.nav-tt li .facebook{
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY94dFgJzF5LSZslFUBivJI2RZAY3YOurkxSPXgG-qt-LesrAlsu-g_5008Dx5Ixkfw5Bh-Xjep0GNs4WfNghjYOFyFRy6Yf3nZ7je1JAVD7wNqdPCtwJ6VbsJCaYEkRvjIqAzKupLOsCN/s128/fb_1.png) no-repeat;
}
.nav-tt li .linkedin{
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheIJyDIIBdAj_cnCiHkky6wSVacp1StGc870pOnHggePSVqdKGlbqfGKci3mMbuzQk5Gqlx9rlHVwkdXYI8USqm754rQhSNW5AxYBTXZBKiexwOi6XlA5eoaE5-8uOu-nn8kEMxqfiQvV0/s128/linkedin.png)no-repeat;
}
.nav-tt li .tumblr{
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlrLItvP4lkHEOF90WmsZxsmyBxsXLUdnhPcM2FKYnnYvD91ba_rUITf-uAtz4dcnv5rL_i3-mZUzqm7uISqx4q717qaNXTO8kRDu2drQ1Rnpzyw_YnPPonWRAUcvUEPl_r47J1j3ZL7p7/s128/tumblr.png) no-repeat;
}
.nav-tt li .youtube{
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTHw0rC3ek9BHVtZUWEvZM_qD6UUqdgt8YFJRvxKx4Fqcq339VQ8fX0cshUxDtEzxU7PA-MR1bzbCixr_oqs_fUZBhrD6CE7MO0xcVWSfVo6UudbfrqI8Nm9B6eooKdPhBTne2QAd4BdM2/s128/you_tube.png) no-repeat;
}
.nav-tt li .mail{
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizFnFGNAVFdj3BDHfs0AsE8Fe3iHjeBiy5Q0MgAfU1cQbpbVEl_96dKn4fV7SSeRrJ1tLgNO_2a5cOrctXie2iHKPewcf-2ZApWptfhfZJ7H_RfZnb4LrQSAa2uqRt_0cri6dMiZMKtTSC/s32/email.png) no-repeat;
}
.nav-tt li .rss{
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc_9XpTc64Q62CzcNuPKPUazTS3n9AbIoRYZ1GUlCaSdUBjUc1aV4OpX8mwfp2wxf9PgvyFP9rZJ_XXcviXCPh2uYN4XslfiuCUHmCKwI2rrYTosZjI0NjEuJmGkrR3jFiYUuzL1G-9Ru-/s128/rss.png) no-repeat;
}
.nav-tt li a span{
width: 80px;
height: 80px;
line-height: 80px;
padding: 10px;
left: 50%;
margin-left: -60px;
font-family: 'Alegreya SC', Georgia, serif;
font-weight: 400;
font-style: italic;
font-size: 14px;
color: #719DAB;
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
text-align: center;
border: 5px solid #ffffff;
background: rgba(255,255,255,0.5);
text-indent: 0px;
position: absolute;
pointer-events: none;
border-radius: 50%;
bottom: -40px;
opacity: 0;
box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.1);
-webkit-transform: scale(0);
-moz-transform: scale(0);
-o-transform: scale(0);
-ms-transform: scale(0);
transform: scale(0);
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
-ms-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
.nav-tt li a span:before,
.nav-tt li a span:after{
content: '';
position: absolute;
bottom: -15px;
left: 50%;
margin-left: -9px;
width: 0;
height: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 11px solid rgba(0,0,0,0.1);
}
.nav-tt li a span:after{
bottom: -13px;
margin-left: -10px;
border-top: 10px solid #ffffff;
}
.nav-tt li a:hover span{
opacity: 0.9;
bottom: 50px;
-webkit-transform: scale(1);
-moz-transform: scale(1);
-o-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
}
¡Opciones!
Simplemente con lo anterior ya obtendremos la funcionalidad de nuestro menú social, pero les comentaré algunas opciones por si lo quieren personalizar mas a su gusto.
Agregar o quitar icono y enlace.
Para poder agregar o quitar marcadores, solo debemos ir al HTML buscar class="nav-tt" en donde encontraremos lo mismo de arriba (El primer codigo).
Para agregar un nuevo enlace, solo deben agregar antes de </ul> y editando según tus datos descritos en los comentarios dentro del código:
Nombre de tu enlace
Después debemos ir al CSS de nuestra plantilla buscando ".nav-tt li a span" (Sin comillas) y antes de ella agregar:
.nav-tt li .Nombre-class-anterior{
/*Agregar nombre del class anterior nombrado en el HTML*/
background: url(Pegar aquí enlace de tu icono) no-repeat;/*Enlace de icono*/
}
Para quitar solo deben hacer lo contrario (Suprimir el CSS del enlace y su HTML).
Efectos:
Para cambiar el tiempo de cómo se muestra el tooltip solo deben buscar ".nav-tt li a span" (Sin comillas) y editar esto:
-webkit-transition: all 0.3s ease-in-out; /*-------------------------------*/
-moz-transition: all 0.3s ease-in-out;/*Cambiar 0.3 por el tiempo que*/
-o-transition: all 0.3s ease-in-out;/* Quieras, se representa en */
-ms-transition: all 0.3s ease-in-out;/* Segundos (0.3 segundos) */
transition: all 0.3s ease-in-out;/*------------------------------------*/
Ejemplo con tiempo de 1 segundo:
Para cambiar la escala o tamaño deben editar esto:
-webkit-transform: scale(0);/*-------------------------------*/
-moz-transform: scale(0);/*Cambiar (0)*/
-o-transform: scale(0);/* Por el tamaño */
-ms-transform: scale(0);/* que quieras */
transform: scale(0);/*------------------------------------*/
Ejemplo escala de 10 con tiempo de 0.5 segundos:
Nota: Recuerden que pueden ahorrarse el tiempo de usar prefijos en el CSS usando
PREFIX FREE. Bueno queridos lectores espero que les guste mi trabajo y les sea de utilidad en sus proyectos y compartanlo. Saludos malignos :)