zoukankan      html  css  js  c++  java
  • css3有文字的开关按钮

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
            <style>
                .wrap{
                    width: 42px;
                    height: 20px;
                }
                input{
                    display: none;
                }
                label{
                    display: block;
                    border: 1px solid #888;
                    height: 20px;
                    border-radius: 15px;
                    transition: .3s;
                }
                label .move{
                    display: block;
                    width: 20px;
                    height: 20px;
                    border-radius: 50%;
                    box-shadow: 1px 1px 1px #ccc;
                    background: #fff;
                    transition: .3s;
                    overflow: hidden;
                }
                input:checked+label{
                    background: red;
                }
                input:checked+label .move{
                    transform: translateX(20px);
                    box-shadow: none;
                }
                .move span{
                    width: 40px;
                    display: block;
                    height: 20px;
                    line-height: 20px;
                    transition: 0.3s;
                }
                input:checked+label .move span{
                    transform: translateX(-20px);
                }
                em{
                    text-align: center;
                    width: 50%;
                    font-size: 12px;
                    font-style: normal;
                    float: left;
                }
            </style>
        </head>
        <body>
            <div class="wrap">
                <input type="checkbox" id="checkbox" />
                <label for="checkbox">
                    <span class="move">
                        <span>
                            <em>on</em>
                            <em>off</em>
                        </span>
                    </span>
                </label>
            </div>
        </body>
    </html>
  • 相关阅读:
    集合 Subset Sums
    resin config 中文(resin.xml)
    resin4 简单学习
    什么是敏捷软件测试
    10个热门IT证书
    LoadRunner监控Linux服务器
    Agile 敏捷开发
    戴明PDCA方法
    【转】什么是内存泄露? 内存泄露检测工具
    LoadRunner常见问题
  • 原文地址:https://www.cnblogs.com/gxywb/p/10318574.html
Copyright © 2011-2022 走看看