Blog ComercialWeb - São Paulo - SP
E-mail: comercial2@comercialweb.com.br
Atualizado: 08/11/2019

Formulário responsivo

Excelente formulário responsivo, adapta a qualquer dispositivo, Celular Tablet ou Desktop.

CSS:
<style>
*{margin: 0; padding: 0;
}
body{
font-family: arial, helvetica, sans-serif;
font-size: 16px;
text-align: center;
}
.container {
  width: 90%;
  margin: 0 auto;
}
.form-contato {
  width: 100%;
  font-family: "Arial", Times, serif;
}
.form-contato-input {
  width: 100%;
  color: #292929;
  font-size: 18px;
  background-color: #E9E9E9;
  border: 1px solid #E9E9E9;
  -moz-border-radius: 5px;
  -webkit-border-radius: 5px;
  border-radius: 5px;
  height: 40px;
  margin-bottom: 20px;
  border-bottom: 1px solid #ccc;
  border-left: 1px solid #ccc;
  text-indent: 20px;
}
.form-contato-textarea {
  width: 100%;
  color: #292929;
  font-size: 18px;
  background-color: #E9E9E9;
  border: 1px solid #E9E9E9;
  -moz-border-radius: 5px;
  -webkit-border-radius: 5px;
  border-radius: 5px;
  height: 200px;
  margin-bottom: 20px;
  border-bottom: 1px solid #ccc;
  border-left: 1px solid #ccc;
  text-indent: 20px;
  padding-top: 16px;
  padding-left: 0;
  padding-right: 0;
  font-family: "Arial", Times, serif;
}
.form-contato-button {
  width: 100%;
  font-size: 18px;
  border-radius: 4px;
  color: #fff;
  height: 40px;
  opacity: .8;
  margin-bottom: 20px;
  cursor: pointer;
  background: #B22222;
  display: block;
  border: none;
  border-bottom: 1px solid #500707;
  border-right: 1px solid #500707;
  transition: 1s;
}
.form-contato-button:hover {
  opacity: 1;
}

</style>

HTML:
<div class="container">
  <form action="#" class="form-contato" method="post" tabindex="1">
    <input type="text" class="form-contato-input" name="nome" placeholder="Nome" required />
    <input type="email" class="form-contato-input" name="email" placeholder="E-mail" required />
    <input type="tel" class="form-contato-input" name="tel" placeholder="Celular" />
    <textarea class="form-contato-textarea" name="conteudo" placeholder="Deixe sua mensagem" required></textarea>
    <button type="submit" class="form-contato-button">Enviar</button>
  </form>
</div>


Veja o resultado

Fonte: Luciano

Comente esta matéria:


Compartilhe esta matéria




Veja Também