日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

label美化css,表单label美化代码

發布時間:2024/10/8 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 label美化css,表单label美化代码 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

化表單,效果如下:

每個lebal有箭頭的背景

有焦點的lebal背景高亮

示例如下:

代碼如下:

復制代碼代碼如下:

姓 名

郵 件

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;}

完整測試代碼:

label 美化

#commentform{

font-size:12px;

}

#commentform label{width:55px;height:24px;display:block;float:left;background:url(//files.zyiz.net/demoimg/201005/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(//files.zyiz.net/demoimg/201005/label.png) no-repeat left -40px;color:#000;

}

#commentform input#submit{width:82px;height:24px;background:url(//files.zyiz.net/demoimg/201005/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(//files.zyiz.net/demoimg/201005/submit.png) no-repeat left bottom;color:#000;}

姓 名

郵 件

提示:您可以先修改部分代碼再運行

請注意圖片的地址。

總結

以上是生活随笔為你收集整理的label美化css,表单label美化代码的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。