Адаптивная форма обратной связи на CSS3 и SVG
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
#feedback-page { text-align: center; } #form-main { width: 100%; float: left; padding-top: 0; } #form-div { background-color: rgba(72,72,72,0.4); padding-left: 35px; padding-right: 35px; padding-top: 35px; padding-bottom: 50px; width: 450px; float: left; left: 50%; position: absolute; margin-top: 30px; margin-left: -260px; -moz-border-radius: 7px; -webkit-border-radius: 7px; } #form-main .feedback-input { color: #3c3c3c; font-family: Helvetica,Arial,sans-serif; font-weight: 500; font-size: 18px; border-radius: 0; line-height: 22px; background-color: #fbfbfb; padding: 13px 13px 13px 54px; margin-bottom: 10px; width: 100%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; border: 3px solid rgba(0,0,0,0); } #form-main .feedback-input:focus { background: #fff; box-shadow: 0; border: 3px solid #3498db; color: #3498db; outline: none; padding: 13px 13px 13px 54px; } #form-main .focused { color: #30aed6; border: #30aed6 solid 3px; } /* Icons ---------------------------------- */ #form-main #name { background-image: url(/img/name.svg); background-size: 30px 30px; background-position: 11px 8px; background-repeat: no-repeat; } #form-main #name:focus { background-image: url(/img/name.svg); background-size: 30px 30px; background-position: 8px 5px; background-position: 11px 8px; background-repeat: no-repeat; } #form-main #email { background-image: url(/img/email.svg); background-size: 30px 30px; background-position: 11px 8px; background-repeat: no-repeat; } #form-main #email:focus { background-image: url(/img/email.svg); background-size: 30px 30px; background-position: 11px 8px; background-repeat: no-repeat; } #form-main #comment { background-image: url(/img/comment.svg); background-size: 30px 30px; background-position: 11px 8px; background-repeat: no-repeat; } #form-main textarea { width: 100%; height: 150px; line-height: 150%; resize: vertical; } #form-main input:hover,#form-main textarea:hover,#form-main input:focus,#form-main textarea:focus { background-color: #fff; } #form-main #button-blue { font-family: 'Montserrat',Arial,Helvetica,sans-serif; float: left; width: 100%; border: #fbfbfb solid 4px; cursor: pointer; background-color: #3498db; color: #fff; font-size: 24px; padding-top: 22px; padding-bottom: 22px; -webkit-transition: all .3s; -moz-transition: all .3s; transition: all .3s; margin-top: -4px; font-weight: 700; } #form-main #button-blue:hover { background-color: rgba(0,0,0,0); color: #0493bd; } #form-main .submit:hover { color: #3498db; } #form-main .ease { width: 0; height: 74px; background-color: #fbfbfb; -webkit-transition: .3s ease; -moz-transition: .3s ease; -o-transition: .3s ease; -ms-transition: .3s ease; transition: .3s ease; } #form-main .submit:hover .ease { width: 100%; background-color: #fff; } @media only screen and (max-width: 580px) { #form-div { left: 3%; margin-right: 3%; width: 88%; margin-left: 0; padding-left: 3%; padding-right: 3%; } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<div id="form-main"> <div id="form-div"> <form class="form" id="form1" name="form1"> <p class="name"><input class="validate[required,custom[onlyLetter],length[0,100]] feedback-input" id="name" name="name" placeholder="Имя" type="text"></p> <p class="email"><input class="validate[required,custom[email]] feedback-input" id="email" name="email" placeholder="Почта" type="text"></p> <p class="text"> <textarea class="validate[required,length[6,300]] feedback-input" id="comment" name="text" placeholder="Сообщение"></textarea></p> <div class="submit"> <input id="button-blue" type="submit" value="Отправить"> <div class="ease"></div> </div> </form> </div> </div> |
Здравствуйте! Я вставил, форма появилась. А дальше то что? Где указывать email и другие настройки. Подробнее объясните пожалуйста.
Далее уже надо подключать к нему свои js скрипты которые будут отправлять нужные данные из формы по нужному адресу.
Это только голый дизайн формы.