我有下面的代碼,現在我卡在如何把標籤中/下一個文本框給予1元的看法,請:我需要把這個標籤放在/或者在文本框旁邊。請有任何想法嗎?
HTML
<div style="position: relative; float: left; margin-left: 12px;">
<input type="text" class="theInput" />
<label class="theLabel">$ |</label>
</div>
CSS
.theInput {
-webkit-appearance: none;
-moz-appearance: none;
text-overflow: ellipsis;
color: #333333;
outline: none;
border: 1px solid #E4EBED;
border-radius: 3px;
width: 70px;
height: 32px;
line-height: 25px;
font-size: 16px;
vertical-align: middle;
background-color: #fff;
padding-left:45px;
}
.theLabel {
position:absolute;
z-index:999;
-webkit-appearance: none;
-moz-appearance: none;
color: #333333;
outline: none;
width: 34px;
height: 32px;
line-height: 30px;
font-size: 20px;
background-color: #fff;
margin-left:-106px;
font-weight: bold;
cursor:default;
}
這是希望的:final result