Carregando...

Formulário Html – Busca Com Efeito Neon

Postado: 14 de novembro de 2021 Tempo de Leitura: 3 Minutos

Formulário Html – Busca Com Efeito Neon

Neste tutorial vamos fazer um formulário de busca com efeito neon com html e css.

Vamos Adicionar o Html:

<section class="busca-neon">
        
      <form action="" method="">          

          <h2><i class="icon icon-magnifying-glass"></i> Faça sua Pesquisa</h2>
          <input class="input-neon" type="search" placeholder="Busca...">                
          <button class="btn">Busca</button>
        
      </form>

</section>

Vamos Adicionar o Css:

.busca-neon {
	
	width:100%;
	height:auto;
	background:#191919;
	padding:1em 0;
	text-align:center;
	float:left; 

}

.busca-neon form {

	position: relative;
	display: inline-block;
	padding:20px;
	margin:auto 0;
	z-index:1;

}

.busca-neon h2 { 

	color: #00d0f2;
	margin-bottom: 15px;
	text-align: center;
	border-bottom: 1px #444 solid;
	padding-bottom: 10px;
    
}

.busca-neon .input-neon {
	
	width:200px;
	height:42px;
	color:#bfbfbf;
	display:block;
	float:left;
	font-family:'open_sansregular';
	font-size:0.9em;
	background: #1a1a1a;
	background: -webkit-linear-gradient(#090909, #1a1a1a);	
	background: -moz-linear-gradient(#090909, #1a1a1a);	
	background: -o-linear-gradient(#090909, #1a1a1a);	
	background: -ms-linear-gradient(#090909, #1a1a1a);	
	background: linear-gradient(#090909, #1a1a1a);
	border: 1px solid #404040;
	border-radius: 50px 0 0 50px;
	box-shadow: 0 2px 0 #000;
	margin: 0;
	padding: 0 18px;
	text-shadow: 0 -1px 0 #000;
	transition:0.5s; 

}

.ie .busca-neon .input-neon {
	line-height: 42px;
}

.busca-neon .input-neon::-webkit-input-placeholder {
   color: #888;
}

.busca-neon .input-neon:-moz-placeholder {
   color: #888;
}

.busca-neon .input-neon:focus {

	-webkit-animation: glow 800ms ease-out infinite alternate;
	-moz-animation: glow 800ms ease-out infinite alternate;
	-o-animation: glow 800ms ease-out infinite alternate;
	-ms-animation: glow 800ms ease-out infinite alternate;
	animation: glow 800ms ease-out infinite alternate;
	background: #1a1a1a;
	background: -webkit-linear-gradient(#090909, #1a1a1a);	
	background: -moz-linear-gradient(#090909, #1a1a1a);	
	background: -o-linear-gradient(#090909, #1a1a1a);	
	background: -ms-linear-gradient(#090909, #1a1a1a);	
	background: linear-gradient(#090909, #1a1a1a);
	border: 1px solid #404040;
	border-radius: 50px 0 0 50px;
	box-shadow: 0 2px 0 #000;
        box-shadow: 0 0 5px rgba(0, 243, 255, 0.2), inset 0 0 5px rgba(0, 243, 255, 0.1), 0 2px 0 #000;
	color: #00cfff;
	outline: none;
}

.busca-neon .input-neon:focus::-webkit-input-placeholder { 
	color: #efe;
}

.busca-neon .input-neon:focus:-moz-placeholder {
	color: #efe;
}

.busca-neon .btn {
		
	width: 75px;
	height: 40px;
	line-height: 40px;
	font-size:0.9em;
	font-family:'open_sansregular';
	color: #bfbfbf;
	background: #222;
	background: -webkit-linear-gradient(#333, #222);
	background: -moz-linear-gradient(#333, #222);
	background: -o-linear-gradient(#333, #222);
	background: -ms-linear-gradient(#333, #222);
	background: linear-gradient(#333, #222);
	-webkit-box-sizing: content-box;
	-moz-box-sizing: content-box;
	-o-box-sizing: content-box;
	-ms-box-sizing: content-box;
	box-sizing: content-box;
	border: 1px solid #444;
	border-left-color: #000;
	border-radius: 0 50px 50px 0;
	box-shadow: 0 2px 0 #000;
	display: block;
	float: left;
	margin: 0;
	padding: 0;
	position: relative;
	text-shadow: 0 -1px 0 #000;
        cursor:pointer; 
	transition:0.5s; 


}	

.busca-neon .btn:hover,
.busca-neon .btn:focus {
	background: #066b7b;
	background: -webkit-linear-gradient(#29c3ff, #066b7b);	
	background: -moz-linear-gradient(#29c3ff, #066b7b);	
	background: -o-linear-gradient(#29c3ff, #066b7b);	
	background: -ms-linear-gradient(#29c3ff, #066b7b);	
        background: linear-gradient(#29c3ff, #066b7b);
        color: #fff;
	outline: none;
}

.busca-neon .btn:active {

	background: #292929;
	background: -webkit-linear-gradient(#393939, #292929);
	background: -moz-linear-gradient(#393939, #292929);
	background: -o-linear-gradient(#393939, #292929);
	background: -ms-linear-gradient(#393939, #292929);
	background: linear-gradient(#393939, #292929);
	box-shadow: 0 1px 0 #000, inset 1px 0 1px #222;

}

@-webkit-keyframes glow {
    0% {
		border-color: #393;
		box-shadow: 0 0 5px rgba(0,255,0,.2), inset 0 0 5px rgba(0,255,0,.1), 0 2px 0 #000;
    }	
    100% {
		border-color: #66fff1;
        box-shadow: 0 0 20px rgba(0, 243, 255, 0.6), inset 0 0 10px rgba(0, 231, 255, 0.4), 0 2px 0 #000;
    }
}

@-moz-keyframes glow {
    0% {
		border-color: #33dbdf;
        box-shadow: 0 0 5px rgba(0, 231, 255, 0.2), inset 0 0 5px rgba(0, 207, 255, 0.1), 0 2px 0 #000;
    }	
    100% {
		border-color: #66e9ff;
        box-shadow: 0 0 20px rgba(0, 219, 255, 0.6), inset 0 0 10px rgba(0, 219, 255, 0.4), 0 2px 0 #000;
    }
}

@-o-keyframes glow {
    0% {
		border-color: #393;
		box-shadow: 0 0 5px rgba(0,255,0,.2), inset 0 0 5px rgba(0,255,0,.1), 0 2px 0 #000;
    }	
    100% {
		border-color: #6f6;
		box-shadow: 0 0 20px rgba(0,255,0,.6), inset 0 0 10px rgba(0,255,0,.4), 0 2px 0 #000;
    }
}

@-ms-keyframes glow {
    0% {
		border-color: #393;
		box-shadow: 0 0 5px rgba(0,255,0,.2), inset 0 0 5px rgba(0,255,0,.1), 0 2px 0 #000;
    }	
    100% {
		border-color: #6f6;
		box-shadow: 0 0 20px rgba(0,255,0,.6), inset 0 0 10px rgba(0,255,0,.4), 0 2px 0 #000;
    }
}

@keyframes glow {
    0% {
		border-color: #33dbdf;
        box-shadow: 0 0 5px rgba(0, 207, 255, 0.2), inset 0 0 5px rgba(0,255,0,.1), 0 2px 0 #000;
    }	
    100% {
		border-color: #66f8ff;
        box-shadow: 0 0 20px rgba(0, 207, 255, 0.6), inset 0 0 10px rgba(0, 183, 255, 0.4), 0 2px 0 #000;
    }
}

Veja o Resultado!

Baixar Código Veja Funcionando

Publicado por: Loop Nerd

1.447 Visualizações

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

Artigos Relacionados