我使用 CSS 使两个复选框看起来像一个...
问题在于当用户通过制表符在文本框之间切换时,他会在
input {
font-family: serif;
font-size: 1.3em;
background: rgba(5, 1, 0, .7);
/* Really good color!! */
color: white;
}
.one {
border: 1px solid black;
border-radius: 3px 0px 0px 3px;
border-right: none;
width: 58px;
padding: 14px;
transition: all .7s ease-in;
}
.two {
border: 1px solid black;
border-radius: 0px 3px 3px 0px;
text-decoration: none;
border-left: none;
width: 100px;
text-align: right;
padding: 14px;
transition: all .7s ease;
}
input:focus {
border: 1px solid black;
box-shadow: 0px 0px 0px white;
outline: none;
}
.one:focus {
border-right: none;
}
.two:focus {
border-left: none;
width: 100px;
}
<input type="text">
<br>
<br>
<input type="text" class="one" value="Name:" readonly>
<input type="text" class="two" placeholder="John Doe">
<br>
<br>
readonly
文本框上制表,而该文本框不应该是可聚焦的。如何使readonly
文本框不被聚焦,并跳过到下一个文本框?Fiddle
<input type="text" class="one" value="姓名:" readonly disabled>
? - Akshay