檢查這一項我希望這將幫助你..
HTML
<p>
<input type="password" class="pw-box" id="pwbox-33" name="post_password">
<input type="submit" class="pw-submit" value="Submit" name="Submit">
</p>
CSS
p {
width:50%;
display: inline;
float: left;
padding-left: 1%;
padding-right: 1%;
position: relative;
font-size: 1em;
line-height: 1.5em;
margin:20px 0 0 20px;
background:rgba(0,0,0,0.1);
}
#pwbox-33 {
width: 200px;
border:0;
background: #606D80;
border-top:solid 1px #1F3453;
color: #DCE0E6;
margin: 0;
padding: 0.5em;
text-shadow: 0 1px 0 #1F1F20;
vertical-align: top;
}
.pw-submit{
cursor: pointer;
background:#2B4C7E;
color: #DCE0E6;
padding: 0.5em 1em;
position: absolute;
text-shadow: 0 -1px 0 #1F1F20;
top: -0.3em;
border:0;
font-size:12px;
font-family:arial;
left:200px;
border-bottom:solid 0.5em #0E2952;
outline:0;
}
http://jsfiddle.net/YjNJ5/3/
對我來說,垂直位置似乎不一致,而不是高度。 – Joonas
我沒有說輸入按鈕上的負相對位置。 – gavsiu