CSS定义Input之Radio和Checkbox的样式
2013-01-30 10:54
656 查看
<style type="text/css">
form#form1 {font:12px tahoma,sans-serif}
input[type="checkbox"] {visibility:hidden;width:0;height:0;margin:0;padding:0;}
input[type="checkbox"]+label {background:url(checkstyle.gif) no-repeat;padding-left:18px;color:#ccc;}
input[type="checkbox"]+label:hover {color:#369;background-position:0 -16px;}
input[type="checkbox"]:checked+label {color:#000;background-position:0 -48px;}
input[type="checkbox"]:focus+label {color:#963;background-position:0 -32px;}
input[type="radio"] {visibility:hidden;width:0;height:0;margin:0;padding:0;}
input[type="radio"]+label {background:url(checkstyle.gif) no-repeat 0 -64px;padding-left:18px;color:#ccc;}
input[type="radio"]+label:hover {color:#369;background-position:0 -80px;}
input[type="radio"]:checked+label {color:#000;background-position:0 -112px;}
input[type="radio"]:focus+label {color:#963;background-position:0 -96px;}
</style>
form#form1 {font:12px tahoma,sans-serif}
input[type="checkbox"] {visibility:hidden;width:0;height:0;margin:0;padding:0;}
input[type="checkbox"]+label {background:url(checkstyle.gif) no-repeat;padding-left:18px;color:#ccc;}
input[type="checkbox"]+label:hover {color:#369;background-position:0 -16px;}
input[type="checkbox"]:checked+label {color:#000;background-position:0 -48px;}
input[type="checkbox"]:focus+label {color:#963;background-position:0 -32px;}
input[type="radio"] {visibility:hidden;width:0;height:0;margin:0;padding:0;}
input[type="radio"]+label {background:url(checkstyle.gif) no-repeat 0 -64px;padding-left:18px;color:#ccc;}
input[type="radio"]+label:hover {color:#369;background-position:0 -80px;}
input[type="radio"]:checked+label {color:#000;background-position:0 -112px;}
input[type="radio"]:focus+label {color:#963;background-position:0 -96px;}
</style>
相关文章推荐
- CSS定义Input之Radio和Checkbox的样式
- css input checkbox和radio样式美化
- 控制input的CSS但不影响CheckBox以及Radio的样式
- 控制input的CSS但不影响CheckBox以及Radio的样式
- css:默认的checkbox、input、radio太丑了?手把手教你改变使用纯css3改写的带动画的默认样式
- css input checkbox和radio样式美化
- 如何实现控制input的CSS但不影响CheckBox以及Radio的样式
- css input[type=file] input[type=radio] input[type=checkbox]样式美化,input上传按钮美化
- 前端开发:css技巧,如何设置select、radio 、 checkbox 、file这些不可直接设置的样式 。
- CSS定义input disabled样式
- css技巧,如何设置select、radio 、 checkbox 、file这些不可直接设置的样式 。
- Css实现checkbox及radio样式自定义
- CSS定义input的type类型样式
- angular 结合 css 用图片自定义radio及checkbox样式
- 巧用CSS3伪类选择器自定义checkbox和radio的样式
- input的checkbox和radio控件样式美化
- CSS定义Radio单选项和Checkbox复选框样式有效代码
- CSS定义input disabled样式
- 利用JavaScript更改input中radio和checkbox样式
- 纯css自定义radio,checkbox样式,提高用户体验