On hover css – Botão 3D
Formulário Pronto Html Css
On hover css – Botão 3D
Neste artigo veremos como criar um Botão 3D com Html e Css.
Para isso precisamos do HTML, CSS.
Nesta seção, projetaremos uma estrutura simples na tag <a>. temos dentro da tag <href> a tag <i> para inserir o texto saiba mais no link.
Vamos Adicionar o HTML
<a href="#" class="btn-3d" title="Saiba mais"> <i class="icon icon-cube"> Saiba mais</i> </a>
Vamos Adicionar o CSS
Nesta seção, usaremos algumas propriedades CSS para projetar o nosso botão 3D.
.btn-3d {
top: 0;
left: 0;
transition: all 0.15s linear 0s;
display: block;
margin: auto;
width: 150px;
background-color: #59D6DB;
color: #404040;
letter-spacing: 1px;
box-shadow: -6px 6px 0 #404040;
text-decoration: none;
}
.btn-3d:hover {
top: 3px;
left: -3px;
box-shadow: -3px 3px 0 #404040;
}
.btn-3d:hover::after {
top: 1px;
left: -2px;
width: 4px;
height: 4px;
}
.btn-3d:hover::before {
bottom: -2px;
right: 1px;
width: 4px;
height: 4px;
}
.btn-3d::after {
transition: all 0.15s linear 0s;
content: "";
position: absolute;
top: 2px;
left: -4px;
width: 8px;
height: 8px;
background-color: #404040;
transform: rotate(45deg);
z-index: 1;
}
.btn-3d::before {
transition: all 0.15s linear 0s;
content: "";
position: absolute;
bottom: -4px;
right: 2px;
width: 8px;
height: 8px;
background-color: #404040;
transform: rotate(45deg);
z-index: 1;
}
a.btn-3d {
position: relative;
}
a:active.btn-3d {
top: 6px;
left: -6px;
box-shadow: none;
}
a:active.btn-3d:before {
bottom: 1px;
right: 1px;
}
a:active.btn-3d:after {
top: 1px;
left: 1px;
}
a.btn-3d i {
display: block;
background:#59D6DB;
font-family: 'open_sansregular';
padding: 15px;
z-index: 2;
position: inherit;
font-style: normal;
}
Combinando as duas seções acima Html + Css temos o seguinte Resultado baixo !
Veja o Resultado !


Deixe um comentário