簡潔的CSS表單
效果:
頁面代碼::
<fieldset><legend>用戶注冊</legend>
<p><label for="name">用戶名:</label><input type="text" name="name"
value="" style="width: 200px; height: 20px" /></p>
<p><label for="pswd">密碼:</label><input type="text" name="pswd"
value="" style="width: 200px; height: 20px" /></p>
<p><label for="pswd">再次輸入密碼:</label><input type="text" name="pswd2"
value="" style="width: 200px; height: 20px" /></p>
<p><input type="button"
value="注冊" style="width: 100px; height: 25px" onclick="registerCheck()"/></p>
</fieldset>
<p><label for="name">用戶名:</label><input type="text" name="name"
value="" style="width: 200px; height: 20px" /></p>
<p><label for="pswd">密碼:</label><input type="text" name="pswd"
value="" style="width: 200px; height: 20px" /></p>
<p><label for="pswd">再次輸入密碼:</label><input type="text" name="pswd2"
value="" style="width: 200px; height: 20px" /></p>
<p><input type="button"
value="注冊" style="width: 100px; height: 25px" onclick="registerCheck()"/></p>
</fieldset>
CSS代碼:
fieldset{
margin:1em 0;
padding:1em;
border:1px solid #ccc;
background:#f8f8f8;
}
legend{
font-weight:bold;
}
label{
display:block;
}
margin:1em 0;
padding:1em;
border:1px solid #ccc;
background:#f8f8f8;
}
legend{
font-weight:bold;
}
label{
display:block;
}
以上。
posted on 2008-02-22 08:47 和風細雨 閱讀(352) 評論(0) 編輯 收藏 所屬分類: CSS