我使用以下代码使用 Contact Form 7 创建了一个垂直表单:
input[type="phone"]::-webkit-input-placeholder {
-webkit-transition: opacity 0.3s linear;
color: black;
}
input[type="phone"]:focus::-webkit-input-placeholder {
opacity: 0;
}
}
input[type="text"]::-webkit-input-placeholder {
-webkit-transition: opacity 0.3s linear;
color: black;
}
input[type="text"]:focus::-webkit-input-placeholder {
opacity: 0;
}
.wpcf7-form-control.wpcf7-submit {
width: 40% !important;
text-align: center !important;
background-color: #ff6600 !important;
color: #0E1428 !important;
font-family: open sans hebrew condensed;
font-size: 20px;
font-style: normal !important;
font-weight: 900;
border: 0;
border-radius: 100em;
display: inline-block;
left: auto;
right: auto;
overflow: hidden;
min-width: 250px;
}
@keyframes bounce {
0%,
20%,
60%,
100% {
-webkit-transform: translateY(0);
transform: translateY(0);
}
40% {
-webkit-transform: translateY(-20px);
transform: translateY(-20px);
}
80% {
-webkit-transform: translateY(-10px);
transform: translateY(-10px);
}
}
input[type="submit"]:hover {
width: 40% !important;
text-align: center !important;
letter-spacing: 4px;
background-color: #0E1428 !important;
color: #ff6600 !important;
font-family: open sans hebrew condensed;
font-size: 20px;
font-style: normal !important;
font-weight: 900;
animation: bounce 1s;
border: 0;
border-radius: 100em;
display: inline-block;
left: auto;
right: auto;
overflow: hidden;
min-width: 250px;
}
body .cf7-style input[type=”text”]:focus,
body .cf7-style input[type=”email”]:focus,
body .cf7-style textarea:focus {
transition: opacity 0.5s 0.5s ease !important;
opacity: 0 !important;
}
[placeholder]:focus::-webkit-input-placeholder {
transition: opacity 0.5s 0.5s ease;
opacity: 0;
}
[placeholder] {
width: 25% !important;
background-color: rgba(255, 255, 255, 0.8) !important;
height: 40px !important;
color: black !important;
margin: 0 auto;
text-align: center !important;
border-radius: 10px !important;
display: inline-block;
left: auto;
right: auto;
font-family: open sans hebrew condensed !important;
font-style: italic;
border: 2px solid #0E1428 !important;
min-width: 164px;
}
[placeholder]:focus {
background-color: rgba(221, 221, 221, 0.8) !important;
transition: opacity 0.5s 0.5s ease !important;
font-family: open sans hebrew condensed !important;
font-style: italic !important;
border: 2px solid #ff6600 !important;
box-shadow: 0 0 10px #719ECE !important;
min-width: 164px;
}
<center>
<label for=".elementor-6 .elementor-element.elementor-element-5m0lukt .wpcf7 input[type=" text "]"><input type=text textarea name="your-name" placeholder="שם" required id:name </input></label> <label for=".wpcf7-form-control.wpcf7-text.wpcf7-tel.wpcf7-validates-as-required.wpcf7-validates-as-tel* your-email"> <input type="phone" textarea name="your-phone" input placeholder="טלפון" id:phone required</input></label> [submit "!אני רוצה עוד פרטים"]
</center>
我检查了给定的链接,您的输入似乎都使用了不同的样式。
首先在您的 HTML 中,左侧输入有 type="text"
,右侧有 type="phone"
。不确定这是否正确。
如果那是正确的,那么您可以修改您的 CSS。似乎很少有样式不适用于 type="phone"
的输入,由于样式的这种差异,正确的样式看起来不同。
form input[type="text"], form input[type="password"], form input[type="email"], form input[type="url"], form input[type="date"], form input[type="month"], form input[type="time"], form input[type="datetime"], form input[type="datetime-local"], form input[type="week"], form input[type="number"], form input[type="search"], form input[type="tel"], form input[type="color"], form select, form textarea {
....
}
在上面的 CSS 中,如果您添加 form input[type="phone"]
,第二个应该也能正确运行。
或
在 HTML 中将第二个输入更改为 type="tel"
以修复(在这种情况下没有 CSS 更改)
<input type="tel" textarea name="your-phone" input placeholder="טלפון" id:phone required</input>
我是一名优秀的程序员,十分优秀!