<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>复选框效果</title>
    <style>
        form{border: 1px solid #ccc;padding: 20px;width: 300px;margin: 30px auto;}
        .wrapper{margin-bottom: 10px;}
        .box{display: inline-block;position: relative;width: 20px;height: 20px;border: 2px solid orange;}
        .box input{position: absolute;top: 0;left: 0;top: -3px;left: -4px;width: 21px;height: 21px; opacity: 0;cursor: pointer;z-index: 5; }
        .box span{position: absolute;top: 1px; right: 6px;font-size: 19px;font-weight: bold;font-family: Arial; -webkit-transform: rotate(18deg); -moz-transform: rotate(18deg); -ms-transform: rotate(18deg); -o-transform: rotate(18deg); transform: rotate(18deg);color: orange;}
        input[type="checkbox"]+span{opacity: 0;}
        input[type="checkbox"]:checked+span{opacity: 1;}
    </style>
</head>
<body>
更多资料免费分享加群     120342833      验证回答     ZZ
<form action="#">
    <div class="wrapper">
        <div class="box">
            <input type="checkbox" checked id="userName" /><span>√</span>
        </div>
        <label for="userName">我是选中状态</label>
    </div>
    <div class="wrapper">
        <div class="box">
            <input type="checkbox" id="userNum" /><span>√</span>
        </div>
        <label for="userNum">我是未选中状态</label>
    </div>
</form>

</body>
</html>

css 绘制checkbox,radio的更多相关文章

  1. css美化checkbox radio样式

    /*check,radio*/ input.check_txt[type='checkbox']{ display: none; } input.check_txt[type='checkbox'] ...

  2. CSS之checkbox&radio&textarea&select

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  3. checkbox & radio 的对齐问题

    不仅不同浏览器不同,不同的字体,不同的文字大小也会表现不一样. 重置 form checkbox & radio 因为不同浏览器解析不一样,有些是默认margin,有些是默认padding,还 ...

  4. jquery 获取和设置 checkbox radio 和 select option的值?

    ============== 获取和设置 checkbox radio 和 select的值? === val()函数, 其名字就表达了 它的意思: 他就是= value 的简写! val就是valu ...

  5. 自定义checkbox/radio

    一. label标签 1. 概念: HTML <label>元素表示用户界面中项目的标题.它通常关联一个控件,或者是将控件放置在label元素内,或者是用作其属性.这样的控制称作label ...

  6. 用CSS美化checkbox复选按钮和raido单选按钮-适用于移动端

    最终效果: 实现方法 index.html: <!DOCTYPE html> <html> <head> <title></title> & ...

  7. struts2学习笔记之表单标签的详解:s:checkbox/radio/select/optiontransferselect/doubleselect/combobox

    struts2中的表单标签都是以s标签的方式定义的,同时,struts2为所有标签都提供了一个模板,C:\Users\180172\Desktop\struts2-core-2.2.1.1.jar\t ...

  8. 自定义常用input表单元素二:纯css实现自定义radio单选按钮

    这是接着上一篇纯css自定义复选框checkbox的第二篇,自定义一个radio单选按钮,同样,采用css伪类和"+"css选择器为思路,下面是预览图: 下面直入主题放代码:HTM ...

  9. jquery的checkbox,radio,select等方法总结

    jquery的checkbox,radio,和select是jquery操作的一个难点和重点,很多前端新手对其了解不是很透彻.时间久了不用,我在写的时候有时也难免对某些操作支支吾吾,记不清楚,现在,对 ...

随机推荐

  1. nginx读取请求体

    请求体的读取一般发生在nginx的content handler中,一些nginx内置的模块,比如proxy模块,fastcgi模块,uwsgi模块等,这些模块的行为必须将客户端过来的请求体(如果有的 ...

  2. Docker实战部署应用——Tomcat

    Tomcat 部署 拉取tomcat镜像 docker pull tomcat:8 创建tomcat容器 创建tomcat容器用于 Web应用,并且进行目录映射 docker run -id --na ...

  3. Codeforces Round #425 (Div. 2) - D

    题目链接:http://codeforces.com/contest/832/problem/D 题意:给定一棵n个点的树,然后给你q个询问,每个询问为三元组(a,b,c),问你从这三个点中选取一个作 ...

  4. 树——populating-next-right-pointers-in-each-node(填充每个节点的next指针)

    问题: Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode ...

  5. Less 混合(mixin)

    Less的混合:混合可以将一个定义好的class A轻松的引入到另一个class B中,从而简单实现class B继承class A中的所有属性.我们还可以带参数地调用,就像使用函数一样. .bord ...

  6. python的次方操作

    好简单,不需要import任何包 b=a**n就是求a的n次方,如果n=0.5就是开方 如果开方的是负数或者附复数,需要 import math b=math.sqrt(a) 这样

  7. Zabbix分布式监控系统实践 自定义配置

    https://www.zabbix.com/wiki/templates/start 环境介绍OS: Ubuntu 10.10 Server 64-bitServers:zabbix-server: ...

  8. 【leetcode】1054. Distant Barcodes

    题目如下: In a warehouse, there is a row of barcodes, where the i-th barcode is barcodes[i]. Rearrange t ...

  9. [luogu] P3809 【模板】后缀排序 (SA)

    板子,照着题解打的倍增版. #include <iostream> #include <cstdio> #include <cstring> using names ...

  10. C#使用phantomjs 进行网页整页截屏

    C#使用phantomjs 进行网页整页截屏 hantomjs 是一个基于js的webkit内核无头浏览器 也就是没有显示界面的浏览器,这样访问网页就省去了浏览器的界面绘制所消耗的系统资源,比较适合用 ...