国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > CSS > 正文

表單label美化代碼

2024-07-11 08:26:39
字體:
來源:轉載
供稿:網友
化表單,效果如下: 每個lebal有箭頭的背景 有焦點的lebal背景高亮

示例如下:


代碼如下:

復制代碼
代碼如下:
<form id="commentform" method="post" action="">
<p class="input"><label for="author">姓 名</label><input type="text" aria-required="true" tabindex="1" size="12" value="" id="author" name="author"></p>
<p class="input">
<label for="email">郵 件</label><input type="text" aria-required="true" tabindex="2" size="12" value="" id="email" name="email"></p>
<p><input type="submit" value="提交評論" tabindex="5" id="submit" name="submit"></p>
</form>

css代碼:

復制代碼
代碼如下:
#commentform{
font-size:12px;
}
#commentform label{width:55px;height:24px;display:block;float:left;background:url(label.png) no-repeat left top;line-height:22px;color:#999;padding-left:18px;}
* html #commentform label{float:none;display:inline;padding:5px 15px 10px 18px;margin-right:10px;vertical-align:middle;}
#commentform input{height:20px;width:220px;border:1px solid #EEE;padding:4px 4px 0 4px;}
#commentform p.input:hover label,#commentform p.input:active label,#commentform p.input:focus label{
background:url(label.png) no-repeat left -40px;color:#000;
}
#commentform input#submit{width:82px;height:24px;background:url(submit.png) no-repeat left top;margin-left:73px;color:#999;border:0 none;line-height:100%;display:block;padding:0;cursor:pointer;}
#commentform input#submit:hover,#commentform input#submit:active,#commentform input#submit:focus{background:url(submit.png) no-repeat left bottom;color:#000;}

完整測試代碼:



發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 平泉县| 遵义县| 江安县| 肥乡县| 游戏| 伊金霍洛旗| 木兰县| 永康市| 德保县| 信宜市| 无棣县| 辉南县| 措勤县| 正阳县| 汾阳市| 九江县| 铜川市| 和政县| 成都市| 报价| 宜黄县| 四会市| 洪湖市| 东安县| 新化县| 类乌齐县| 凤山市| 那曲县| 淄博市| 台东县| 卢氏县| 墨江| 武汉市| 金昌市| 新平| 平山县| 新平| 宁南县| 新乡县| 泽州县| 马尔康县|