单选 复选按钮 样式

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>选择框样式</title>
<style>
label {font-size:12px;cursor:pointer;}
label i {font-size:12px;font-style:normal;display:inline-block;width:12px;height:12px;text-align:center;line-height:12px;color:#fff;vertical-align:middle;margin:-2px 2px 1px 0px;border:#2489c5 1px solid;}
input[type="checkbox"],input[type="radio"] {display:none;}
input[type="radio"] + i {border-radius:7px;}
input[type="checkbox"]:checked + i,input[type="radio"]:checked + i {background:#2489c5;}
input[type="checkbox"]:disabled + i,input[type="radio"]:disabled + i {border-color:#ccc;}
input[type="checkbox"]:checked:disabled + i,input[type="radio"]:checked:disabled + i {background:#ccc;}
</style>
</head>
<body>
<label><input type="checkbox"><i>?</i>复选框</label><br>
<label><input type="checkbox" checked><i>?</i>复选框</label><br>
<label><input type="checkbox" disabled><i>?</i>复选框禁用</label><br>
<label><input type="checkbox" disabled checked><i>?</i>复选框禁用已选</label><br>
<label><input type="radio" name="abc"><i>?</i>单选框</label><br>
<label><input type="radio" name="abc" checked><i>?</i>单选框</label><br>
<label><input type="radio" name="abc" disabled><i>?</i>单选框禁用</label><br>
<label><input type="radio" name="def" disabled checked><i>?</i>单选框禁用已选</label><br>
</body>
</html>

非原创

时间: 2024-08-18 03:06:00

单选 复选按钮 样式的相关文章

单选-复选按钮自定义样式

通过":checked"配合其他标签来自定义复选框样式 Html代码: <form action="#"> <div class="wrapper"> <div class="box"> <input type="checkbox" checked="checked" id="username" /> <span&

加监听器,单选复选按钮

MainActivity package com.example.lenovo.myapplication; import android.provider.MediaStore; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.CheckBox; import android.widget.CompoundButton; import android

纯css修改单选、复选按钮样式

只支持IE9及以上 html <label><input class="radio" type="radio" name="radio1"/><span class="radio-style"></span>10</label> <label><input class="radio" type="checkbox&quo

jqurey 遍历 div内的所有input单选复选按钮并判断是否选中

关于页面前面标签 <ul> @{ foreach (var item in vote) { if (!string.IsNullOrEmpty(item.Img)) { <li class="vop"> @if (!string.IsNullOrEmpty(item.VoteText)) { <a href="[email protected]&[email protected]"> <img src="@

css3单选 复选按钮--代码分享

1.html <div> <input type="checkbox" id="option"/> <label for="option"> <span></span> 点击1 </label></div><div> <input type="radio" name="my-radio" id="

[SAP ABAP开发技术总结]选择屏幕——按钮、单选复选框

目录导航 声明:原创作品,转载时请注明文章来自SAP师太博客,并以超链接形式标明文章原始出处,否则将追究法律责任!原文出自: 12.6.         按钮.单选复选框.下拉框的FunCode. 91 12.6.1.     选择屏幕中的按钮... 92 12.6.2.     选择屏幕中的单选/复选按钮:点击时显示.隐藏其他屏幕元素... 92 12.6.     按钮.单选复选框.下拉框的FunCode 如果复选框与单选按钮没有设置Function Code,则它们就会像普通的输入框一样,

移动开发不能不知道的事- css3复选框样式自定义

样式化复选框(Styling Checkbox) 复选框 Checkbox 是 Web 应用常用控件,随处可见,原生的复选框控件一般就像下面这样: 选中状态  未选状态 这取决于操作系统和浏览器,有些时候,这种样子并不能满足设计要求,这时需要更为精致的复选框样式.以往只有少数浏览器才支持对这类控件应用样式,比如拿到这样一张设计图: blue.png 在过去,想要通过简单地修改样式达成这种设计效果根本不行,不过,现在借助强大的 CSS3 属性 appearance 可以对该类控件有空前的样式控制能

自定义复选框样式及全选操作

自定义复选框样式 复选框结构 input框去其样式宽高为0;定位到父盒子内,我们需用其:checked 属性 下面的span为自定义样式,定位到父盒子内 . 效果展示 js 代码 模拟复选框样式 $(".ck_MN").click(function(){ var ck_Inp = $(this).siblings(".ckIpt"); var Ck_box = $(this).parents(".Ckbox"); if(ck_Inp.prop(&

【Android】标签页、计时器、单选按钮、复选按钮

写一个小程序把安卓程序中的几个基础组件的基本用法串联起来. 如下图所示: 在安卓程序中,一个计时器,一直在不断地计时,每10秒弹出一个提示. MainActivity被一个标签页分成两部分,一部分,有单选按钮与复选按钮,最后有一个提交按钮, 结果在另一个标签页中显示. 用这个程序来说明安卓中标签页.计时器.单选按钮.复选按钮的用法. 首先贴上res\values\string.xml中,各个组件的字符串. <?xml version="1.0" encoding="ut