答案 0 :(得分:0)
此处不需要JavaScripting,
.round {
border:1px solid grey;
border-radius: 4px;
padding: 8px;
}
.round input {
border:0px solid black;
width: 40px;
margin-right: 8px;
}
.round label {
color: grey;
}
.container {
width: 200px;
}

<div class="container">
<div class="round">
<label><input type="text">seconds</input></label>
</div>
</div>
&#13;
HTMLDog's CSS tutorial是一个很棒的人。
答案 1 :(得分:0)
#test{
width:100px;
border:1px solid #E0E0E0;
display:inline-block;
border-radius: 5px;
border-top:1px solid #BBDEFB;
}
input{
width:25px;
float:left;
border:none;
}
label{
color:#BDBDBD
}
input:focus{
outline: none;
}
&#13;
<div id="test">
<div>
<input type="text">
</div>
<div>
<label>Seconds</label>
</div>
</div>
&#13;