Красивая форма для сайта

Для создания форм с необычным дизайном можно использовать как тематику сайта, так и назначение самой формы. Например, в форме регистрации пассажира для поездки на железнодорожном транспорте использовать градиентную заливку, напоминающую железнодорожные пути, а для формы обратной связи — почтовую тематику.

Перейти на страницу с примерами

Пример 1. Форма регистрации пассажира

<form action="" class="railway">
<div class="stripes-block">
<div class="line"></div>
</div>
<h3>Информация о пассажире</h3>
<div class="form-group">
<input type="text" id="name" required><label for="name">Имя</label>
<input type="text" id="pass" required><label for="pass">Паспортные данные</label>
<input type="email" id="email" required><label for="email">Email</label>
<input type="text" id="phone" required><label for="phone">Номер телефона</label>
</div>
<div class="submit-block">
<div class="submit-button">
<i class="fa fa-train" aria-hidden="true"></i><br>
<input type="submit" value="Отправить">
</div>
</div>
</form>
* {
   box-sizing: border-box;
}
.railway {
   max-width: 350px;
   margin: 50px auto 0;
   padding: 20px;
   background: #FAAB1B;
   font-family: 'Oswald', sans-serif;
}
.stripes-block {
   position: relative;
   padding: 10px 10px 15px;
   margin-bottom: 20px;
   background: repeating-linear-gradient(-30deg, #291810, #291810 8px, #FAAB1B 10px, #FAAB1B 14px);
}
.stripes-block:before {
   content: "";
   position: absolute;
   left: 50%;
   top: 12px;
   margin-left: -6px;
   width: 14px;
   height: 14px;
   border-radius: 50%;
   background: #fffffe;
   box-shadow: 0 0 0 2px #291810, 0 0 0 12px #9c8778;
}
.line {
   width: 60%;
   margin: 0 auto;
   height: 15px;
   border: 2px solid #603624;
   border-radius: 3px;
   background: repeating-linear-gradient(90deg, #FAAB1B, #FAAB1B 3px, #603624 3px, #603624 6px);
}
.railway h3 {
   padding: 7px;
   margin-bottom: 20px;
   text-align: center;
   line-height: 1;
   text-transform: uppercase;
   color: #FAAB1B;
   background: #291810;
}
.form-group {
   margin-bottom: 20px;
   padding: 10px;
   background: #291810;
}
.form-group input, .form-group label, .form-group textarea {
   display: block;
   width: 100%;
}
.form-group input {
   padding: 0;
   line-height: 30px;
   background: #FAAB1B;
   border-width: 0;
}
.form-group label {
   margin-bottom: 5px;
   color: #FAAB1B;
   text-transform: uppercase;
   font-size: 12px;
}
.submit-block {
   padding: 10px 20px 20px;
   background: repeating-linear-gradient(-30deg, #291810, #291810 8px, #FAAB1B 10px, #FAAB1B 14px);
   text-align: center;
   cursor: pointer;
}
.submit-button {
   display: inline-block;
   padding: 5px 10px;
   background: #FAAB1B;
}
.submit-button input {
   padding: 0;
   background: #FAAB1B;
   border-width: 0;
   text-transform: uppercase;
   cursor: pointer;
}

Пример 2. Форма в стиле этикетки для одежды

<form action="" class="air">
<div class="form-inner">
<div class="stripes-block"></div>
<div class="form-row">
<label for="name">Имя</label>
<input type="text" id="name" required>
</div>
<div class="form-row">
<label for="address">Адрес</label>
<textarea rows="3" id="address" required></textarea>
</div>
<div class="form-row-icon">
<i class="fa fa-tty"></i>
<input type="text" id="phone" required>
</div>
<div class="form-row-icon">
<i class="fa fa-envelope-o"></i>
<input type="email" id="email" required>
</div>
<div class="form-row-icon">
<i class="fa fa-paper-plane-o"></i>
<input type="submit" value="">
</div>
</div>
</form>
* {box-sizing: border-box;}
.air {
  max-width: 350px;
  margin: 50px auto 0;
  padding: 20px;
  background: #E4E3DF;
  font-family: 'Oswald', sans-serif;
}
.form-inner {
  border: 2px solid #909090;
  border-bottom: none;
}
.stripes-block {
  position: relative;
  padding: 15px;
  margin-bottom: 20px;
  background: repeating-linear-gradient(-45deg, #E4E3DF, #E4E3DF 5px, #909090 6px, #909090 8px);
  border-bottom: 2px solid #909090;
}
.stripes-block:before {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  margin-left: -6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fffffe;
  box-shadow: 0 0 0 1px #090606, 0 0 0 12px #9c8778;
}
.form-row {
  position: relative;
  padding: 10px;
  border-bottom: 2px solid #909090;
}
.form-row label {
  display: block;
}
.form-row input {
  display: block;
  width: 100%;
  padding: 0;
  line-height: 30px;
  border-width: 0;
  background: #E4E3DF;
}
.form-row textarea {
  width: 100%;
  margin-bottom:40px;
  padding: 0;
  outline: 0;
  line-height: 40px;
  background: transparent url(https://html5book.ru/wp-content/uploads/2016/12/bg-form.png) bottom left repeat-x;
  background-size: 8px 40px;
  letter-spacing: 0.2em;
  background-attachment: local;
  background-repeat: repeat;
  border-width: 0;
  resize: none;
}
.form-row-icon {
  position: relative;
  border-bottom: 2px solid #909090;
}
.form-row-icon .fa {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background: #909090;
  color: #E4E3DF;
  border-bottom: 2px solid;
}
.form-row-icon input {
  display: block;
  width: 100%;
  padding: 0 10px 0 50px;
  line-height: 40px;
  box-sizing: border-box;
  border-width: 0;
  background: #E4E3DF;
}
.form-row-icon .fa-paper-plane-o {
  border-bottom-color: #909090;
  cursor: pointer;
}
.form-row-icon input[type="submit"] {
  cursor: pointer;
}

Пример 3. Форма-почтовая открытка

<form action="" class="postcard">
<div class="form-row">
<label for="name">Ваше имя</label><input type="text" id="name" required>
</div>
<div class="form-row">
<label for="email">Ваш Email</label><input type="email" id="email" required>
</div>
<div class="form-row">
<label for="message">Ваше сообщение</label><textarea rows="5" id="message" required></textarea>
</div>
<div class="form-row">
<input type="submit" value="Отправить сообщение">
</div>
</form>
* {
   box-sizing: border-box;
}
body {
   background: #F5E9D9;
}
.postcard {
   max-width: 350px;
   margin: 50px auto 0;
   padding: 20px;
   background: #fffdee;
   border: 10px solid transparent;
   border-image: 10 repeating-linear-gradient(135deg, #C42061, #C42061 10px, transparent 10px, transparent 20px, #FBCFDF 20px, #FBCFDF 30px, transparent 30px, transparent 40px);
   font-family: 'Playfair Display';
   color: #605756;
}
.form-row {
   margin-bottom: 15px;
}
.form-row input[type="text"], .form-row input[type="email"], .form-row textarea {
   width: 100%;
   padding: 0 10px;
   line-height: 35px;
   border-width: 0;
   outline: none;
   background: transparent url(https://html5book.ru/wp-content/uploads/2016/12/bg-form.png) bottom left repeat-x;
   background-size: 8px 35px;
   font-family: 'Playfair Display';
}
.form-row textarea {
   background-attachment: local;
   background-repeat: repeat;
   resize: none;
}
.form-row input[type="submit"] {
   padding: 10px 20px;
   margin-top: 10px;
   background: #F67CA5;
   border-width: 0;
   cursor: pointer;
   outline: none;
   font-family: 'Playfair Display';
   font-size: 13px;
   letter-spacing: 1px;
   color: #fffdee;
   text-transform: uppercase;
   transition: 1s cubic-bezier(.165, .84, .44, 1);
}
.form-row input[type=submit]:hover {
   background: #C42061;
}

Пример 4. «Говорящая» форма

<form class="decor">
<div class="form-left-decoration"></div>
<div class="form-right-decoration"></div>
<div class="circle"></div>
<div class="form-inner">
<h3>Написать нам</h3>
<input type="text" placeholder="Username">
<input type="email" placeholder="Email">
<textarea placeholder="Сообщение..." rows="3"></textarea>
<input type="submit" value="Отправить">
</div>
</form>
* {
   box-sizing: border-box;
}
body {
   background: #f69a73;
}
.decor {
   position: relative;
   max-width: 400px;
   margin: 50px auto 0;
   background: white;
   border-radius: 30px;
}
.form-left-decoration, .form-right-decoration {
   content: "";
   position: absolute;
   width: 50px;
   height: 20px;
   background: #f69a73;
   border-radius: 20px;
}
.form-left-decoration {
   bottom: 60px;
   left: -30px;
}
.form-right-decoration {
   top: 60px;
   right: -30px;
}
.form-left-decoration:before, .form-left-decoration:after, .form-right-decoration:before, .form-right-decoration:after {
   content: "";
   position: absolute;
   width: 50px;
   height: 20px;
   border-radius: 30px;
   background: white;
}
.form-left-decoration:before {
   top: -20px;
}
.form-left-decoration:after {
   top: 20px;
   left: 10px;
}
.form-right-decoration:before {
   top: -20px;
   right: 0;
}
.form-right-decoration:after {
   top: 20px;
   right: 10px;
}
.circle {
   position: absolute;
   bottom: 80px;
   left: -55px;
   width: 20px;
   height: 20px;
   border-radius: 50%;
   background: white;
}
.form-inner {
   padding: 50px;
}
.form-inner input, .form-inner textarea {
   display: block;
   width: 100%;
   padding: 0 20px;
   margin-bottom: 10px;
   background: #E9EFF6;
   line-height: 40px;
   border-width: 0;
   border-radius: 20px;
   font-family: 'Roboto', sans-serif;
}
.form-inner input[type="submit"] {
   margin-top: 30px;
   background: #f69a73;
   border-bottom: 4px solid #d87d56;
   color: white;
   font-size: 14px;
}
.form-inner textarea {
   resize: none;
}
.form-inner h3 {
   margin-top: 0;
   font-family: 'Roboto', sans-serif;
   font-weight: 500;
   font-size: 24px;
   color: #707981;
}

Пример 5. Форма с фоновым изображением и полупрозрачным эффектом наложения

<form class="transparent">
<div class="form-inner">
<h3>Регистрация</h3>
<label for="username">Имя пользователя</label>
<input type="text" id="username">
<label for="password">Пароль</label>
<input id="password" type="password">
<input type="checkbox" id="custom-checkbox">
<label for="custom-checkbox">Запомнить меня</label>
<input type="submit" value="Отправить">
</div>
</form>
* {
   box-sizing: border-box;
}
.transparent {
   position: relative;
   max-width: 400px;
   padding: 60px 50px;
   margin: 50px auto 0;
   background-image: url(https://html5book.ru/wp-content/uploads/2017/01/photo-roses.jpg);
   background-size: cover;
}
.transparent:before {
   content: "";
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   background: linear-gradient(to right bottom, rgba(43, 44, 78, .5), rgba(104, 22, 96, .5));
}
.form-inner {
   position: relative;
}
.form-inner h3 {
   position: relative;
   margin-top: 0;
   color: white;
   font-family: 'Roboto', sans-serif;
   font-weight: 300;
   font-size: 26px;
   text-transform: uppercase;
}
.form-inner h3:after {
   content: "";
   position: absolute;
   left: 0;
   bottom: -6px;
   height: 2px;
   width: 60px;
   background: #1762EE;
}
.form-inner label {
   display: block;
   padding-left: 15px;
   font-family: 'Roboto', sans-serif;
   color: rgba(255, 255, 255, .6);
   text-transform: uppercase;
   font-size: 14px;
}
.form-inner input {
   display: block;
   width: 100%;
   padding: 0 15px;
   margin: 10px 0 15px;
   border-width: 0;
   line-height: 40px;
   border-radius: 20px;
   color: white;
   background: rgba(255, 255, 255, .2);
   font-family: 'Roboto', sans-serif;
}
.form-inner input[type="checkbox"] {
   position: absolute;
   opacity: 0;
}
#custom-checkbox+label {
   position: relative;
   margin: 20px 0;
   text-transform: none;
   cursor: pointer;
}
#custom-checkbox+label:before {
   content: "";
   display: inline-block;
   width: 20px;
   height: 20px;
   margin-right: 10px;
   vertical-align: text-top;
   background: white;
}
#custom-checkbox:checked+label:before {
   background: #1762EE;
}
#custom-checkbox:checked+label:after {
   content: "";
   position: absolute;
   width: 2px;
   height: 2px;
   left: 20px;
   top: 9px;
   background: white;
   box-shadow: 2px 0 0 white, 4px 0 0 white, 4px -2px 0 white, 4px -4px 0 white, 4px -6px 0 white, 4px -8px 0 white;
   transform: rotate(45deg);
}
.form-inner input[type="submit"] {
   background: #1762EE;
}

Пример 6. Форма регистрации для свадебного сайта

<form action="" class="wedding">
<div class="form-inner">
<h2>Вы приглашены?<br>
Подтвердите ваше участие</h2>
<div class="form-content">
<h3>Ваше имя:</h3>
<p><input type="text" name="your-name" ></p>
<h3>Гостей:</h3>
<p>
<select name="guests">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
</p>
<h3>Я приглашен...</h3>
<p>
<select name="attending">
<option value="All events">На все мероприятия</option>
<option value="Ceremony">На церемонию</option>
<option value="Party">На вечеринку</option>
</select>
</p>
<p><input type="submit" value="Я подтверждаю"></p>
</div>
</div>
</form>
* {
   box-sizing: border-box;
}
body {
   background: #FFF2E3;
}
.wedding {
   position: relative;
   max-width: 320px;
   margin: 50px auto 0;
   text-align: center;
}
.form-inner:before {
   display: inline-block;
   margin-top: -45px;
   content: url(https://html5book.ru/wp-content/uploads/2017/05/form-flower.png);
}
.form-inner {
   padding: 0 40px 10px;
   margin-top: 45px;
   background: #ffffff;
   border-radius: 2px;
   box-shadow: 0 0 6px 1px rgba(0, 0, 0, .1);
}
.form-inner h2 {
   font-weight: 300;
   font-size: 20px;
   text-transform: uppercase;
   font-family: 'Cormorant Garamond', serif;
}
.form-content {
   position: relative;
   margin: 30px -40px 0 -40px;
   padding: 10px 40px 0 40px;
   background: #FFF8F3;
}
.form-content:before {
   content: "";
   position: absolute;
   top: -4px;
   right: 0;
   left: 0;
   height: 2px;
   border-top: 1px solid #DDDDDD;
   border-bottom: 1px solid #DDDDDD;
}
.form-content h3 {
   font-family: 'Marck Script', cursive;
   font-size: 22px;
   color: #898989;
   font-weight: normal;
}
.form-content input, .form-content select {
   height: 38px;
   line-height: 38px;
   padding: 0 10px;
   background: #ffffff;
   border: 1px solid #DDDDDD;
   font-size: 20px;
   font-family: 'Cormorant Garamond', serif;
   color: #808080;
   outline: none;
}
.form-content input {
   width: 100%;
}
.form-content input:focus, .form-content select:focus {
   border-color: #C44D58;
}
.form-content input[type="submit"] {
   margin: 20px 0;
   padding: 0 10px;
   background: #FF6B6B;
   color: #ffffff;
   font-size: 18px;
   text-transform: uppercase;
   border-width: 0;
   border-radius: 20px;
   cursor: pointer;
   transition: .2s linear
}
.form-content input[type="submit"]:hover {
   background: #C44D58;
}

Пример 7. Форма с анимированными подписями к полям

<form action="" class="ui-form">
<h3>Войти на сайт</h3>
<div class="form-row">
<input type="text" id="email" required autocomplete="off"><label for="email">Email</label>
</div>
<div class="form-row">
<input type="password" id="password" required autocomplete="off"><label for="password">Пароль</label>
</div>
<p><input type="submit" value="Войти"></p>
</form>
* {
   box-sizing: border-box;
}
body {
   background: #e6f4fd;
   font-family: 'Roboto', sans-serif;
}
.ui-form {
   max-width: 350px;
   padding: 80px 30px 30px;
   margin: 50px auto 30px;
   background: white;
}
.ui-form h3 {
   position: relative;
   z-index: 5;
   margin: 0 0 60px;
   text-align: center;
   color: #4a90e2;
   font-size: 30px;
   font-weight: normal;
}
.ui-form h3:before {
   content: "";
   position: absolute;
   z-index: -1;
   left: 60px;
   top: -30px;
   width: 100px;
   height: 100px;
   border-radius: 50%;
   background: #fee8e4;
}
.ui-form h3:after {
   content: "";
   position: absolute;
   z-index: -1;
   right: 50px;
   top: -40px;
   width: 0;
   height: 0;
   border-left: 55px solid transparent;
   border-right: 55px solid transparent;
   border-bottom: 90px solid #ffe3b5;
}
.form-row {
   position: relative;
   margin-bottom: 40px;
}
.form-row input {
   display: block;
   width: 100%;
   padding: 0 10px;
   line-height: 40px;
   font-family: 'Roboto', sans-serif;
   background: none;
   border-width: 0;
   border-bottom: 2px solid #4a90e2;
   transition: all 0.2s ease;
}
.form-row label {
   position: absolute;
   left: 13px;
   color: #9d959d;
   font-size: 20px;
   font-weight: 300;
   transform: translateY(-35px);
   transition: all 0.2s ease;
}
.form-row input:focus {
   outline: 0;
   border-color: #F77A52;
}
.form-row input:focus+label, .form-row input:valid+label {
   transform: translateY(-60px);
   margin-left: -14px;
   font-size: 14px;
   font-weight: 400;
   outline: 0;
   border-color: #F77A52;
   color: #F77A52;
}
.ui-form input[type="submit"] {
   width: 100%;
   padding: 0;
   line-height: 42px;
   background: #4a90e2;
   border-width: 0;
   color: white;
   font-size: 20px;
}
.ui-form p {
   margin: 0;
   padding-top: 10px;
}

Поделиться: