zoukankan      html  css  js  c++  java
  • ios开关按钮

     .al-toggle-button{
                appearance: none;
                -webkit-appearance: none;
                position: relative;
                width: 52px;
                height: 32px;
                background: #dfdfdf;
                border-radius: 16px;
                border: 1px solid #dfdfdf;
                outline: 0;
                box-sizing: border-box;
            }
            .al-toggle-button:checked{
                border-color: #04be02;
                background-color: #04be02;
            }
            .al-toggle-button:before, .al-toggle-button:after{
                content: " ";
                position: absolute;
                top: 0;
                left: 0;
                height: 30px;
                border-radius: 15px;
                transition: transform 0.3s;
                transition: -webkit-transform 0.3s;
                transition: transform 0.3s, -webkit-transform 0.3s;
                -webkit-transition: -webkit-transform 0.3s;
            }
            .al-toggle-button:before{
                width: 50px;
                background-color: #fdfdfd;
            }
            .al-toggle-button:after{
                width: 30px;
                background-color: white;
                box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
            }
            .al-toggle-button:checked:before{
                transform: scale(0);
                -webkit-transform: scale(0);
            }
            .al-toggle-button:checked:after{
                transform: translateX(20px);
                -webkit-transform: translateX(20px);
            }
    <input type="checkbox" class="al-toggle-button">
  • 相关阅读:
    java笔试之输出
    构造块和静态块[转]
    Java 对象和类
    StringBuffer
    基于bootstrap的表格数据展示
    弹窗式页面
    读取xml
    更新xml
    写XML
    遍历一个类的字段和值
  • 原文地址:https://www.cnblogs.com/liulinjie/p/8399704.html
Copyright © 2011-2022 走看看