单选框样式示例

HTML+CSS 多选、单选框样式示例

1.使用clip:rect():
< body >
thisisacheckbox
< input type ="checkbox" style ="position:absolute;clip:rect(5,14,14,5);background:red" id ="myCheckbox" >
< span style ="position:absolute;border:solid1pxblue;width:9px;height:9px;left:expression(myCheckbox.offsetLeft+5);top:expression(myCheckbox.offsetTop+5)" > <!-- --> </ span >
</ body >
2.基本样式:
< br > 单选和复选按钮的背景是红色的 < br >
< input type ="checkbox" name ="checkbox" value ="checkbox" style ="background-color:#FF0000;border:1pxdashedlime;" >
< input type ="radio" name ="radiobutton" value ="radiobutton" style ="background-color:#FF0000" >
3.CSS样式:
< style > ... .mycheckbox{...}{position:absolute;clip:rect(617176);}</style>
<inputtype=checkboxclass='mycheckbox'>&nbsp;&nbsp;&nbsp;&nbsp;thisisaCheckbox

你可能感兴趣的:(样式)