Animação Css3 Entrada de Texto Efeito Bounce In
Postado: 28 de setembro de 2021
Tempo de Leitura: 2 Minutos
Animação Css3 Entrada de Texto Efeito Bounce In
Neste artigo vamos fazer uma entrada de texto com css efeito Bounce In
Vamos Adicionar o Html:
<div class="texto-animado"> <h1> <span class="animated bounceIn delay-03">Loop</span> <span class="animated bounceIn delay-04">Nerd</span> </h1> <p class="animated fadeInUp delay-1">Tutorias sobre Html e Css</p> </div>
Vamos Adicionar o Css:
.texto-animado { width:100%; margin:auto; display: block; overflow:hidden; } .texto-animado h1 { margin-top: 5%; font-size: 2.5em; display: inline-block; } .texto-animado h1 span { position: relative; float: left; font-family: 'open_sansbold'; color:#343434; } .texto-animado h1 span:first-child { color: #03d4dd; margin-right: 1rem; font-weight:bold; font-family: 'open_sansbold'; } .texto-animado p { width: auto; display: block; border-top: 1px #f4f3f3 solid; font-size: 0.9em; color: #b7b7b7; padding-top: 0.3em; letter-spacing: 3.5px; } .delay-1 { -moz-animation-delay: 1s; -webkit-animation-delay: 1s; animation-delay: 1s; } .delay-03 { -moz-animation-delay: 0.3s; -webkit-animation-delay: 0.3s; animation-delay: 0.3s; } .delay-04 { -moz-animation-delay: 0.4s; -webkit-animation-delay: 0.4s; animation-delay: 0.4s; } /*Anima Texto*/ .animated { -webkit-animation-duration: 1s; animation-duration: 1s; -webkit-animation-fill-mode: both; animation-fill-mode: both; } /*Entrada Bounce In*/ @-webkit-keyframes bounceIn { 0%, 20%, 40%, 60%, 80%, 100% { -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); } 0% { opacity: 0; -webkit-transform: scale3d(.3, .3, .3); transform: scale3d(.3, .3, .3); } 20% { -webkit-transform: scale3d(1.1, 1.1, 1.1); transform: scale3d(1.1, 1.1, 1.1); } 40% { -webkit-transform: scale3d(.9, .9, .9); transform: scale3d(.9, .9, .9); } 60% { opacity: 1; -webkit-transform: scale3d(1.03, 1.03, 1.03); transform: scale3d(1.03, 1.03, 1.03); } 80% { -webkit-transform: scale3d(.97, .97, .97); transform: scale3d(.97, .97, .97); } 100% { opacity: 1; -webkit-transform: scale3d(1, 1, 1); transform: scale3d(1, 1, 1); } } @keyframes bounceIn { 0%, 20%, 40%, 60%, 80%, 100% { -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); } 0% { opacity: 0; -webkit-transform: scale3d(.3, .3, .3); transform: scale3d(.3, .3, .3); } 20% { -webkit-transform: scale3d(1.1, 1.1, 1.1); transform: scale3d(1.1, 1.1, 1.1); } 40% { -webkit-transform: scale3d(.9, .9, .9); transform: scale3d(.9, .9, .9); } 60% { opacity: 1; -webkit-transform: scale3d(1.03, 1.03, 1.03); transform: scale3d(1.03, 1.03, 1.03); } 80% { -webkit-transform: scale3d(.97, .97, .97); transform: scale3d(.97, .97, .97); } 100% { opacity: 1; -webkit-transform: scale3d(1, 1, 1); transform: scale3d(1, 1, 1); } } .bounceIn { -webkit-animation-name: bounceIn; animation-name: bounceIn; } @-webkit-keyframes bounceInDown { 0%, 60%, 75%, 90%, 100% { -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); } 0% { opacity: 0; -webkit-transform: translate3d(0, -3000px, 0); transform: translate3d(0, -3000px, 0); } 60% { opacity: 1; -webkit-transform: translate3d(0, 25px, 0); transform: translate3d(0, 25px, 0); } 75% { -webkit-transform: translate3d(0, -10px, 0); transform: translate3d(0, -10px, 0); } 90% { -webkit-transform: translate3d(0, 5px, 0); transform: translate3d(0, 5px, 0); } 100% { -webkit-transform: none; transform: none; } } /*Entrada Bounce In*/ /*Entrada FadeInUp*/ @-webkit-keyframes fadeInUp { 0% { opacity: 0; -webkit-transform: translate3d(0, 100%, 0); transform: translate3d(0, 100%, 0); } 100% { opacity: 1; -webkit-transform: none; transform: none; } } @keyframes fadeInUp { 0% { opacity: 0; -webkit-transform: translate3d(0, 100%, 0); transform: translate3d(0, 100%, 0); } 100% { opacity: 1; -webkit-transform: none; transform: none; } } .fadeInUp { -webkit-animation-name: fadeInUp; animation-name: fadeInUp; } /*Entrada FadeInUp*/ /*Responsivo*/ /*960PX BREAKPOINT*/ @media (min-width:60em){ .texto-animado { width:310px; } .texto-animado h1 { font-size:3em;} .texto-animado p { font-size: 1.2em; } }
Veja o Resultado!
Baixar Código Veja Funcionando
Publicado por: Loop Nerd
675 Visualizações
Deixe um comentário