• css3实现对radio和checkbox的美化


    一,如何隐藏小程序中的很粗的滚动条,实现页面的美化?
     
    tit: 在开发小程序的过程中,无论是横向或者纵向当产生滚动条时,系统默认的滚动条会很粗,效果展示十分难看,我们可以通过设置如下wxss代码实现滚动条的美化。
     
    方法一:
    ::-webkit-scrollbar {
        display:none;
    }
     
    方法二:
    ::-webkit-scrollbar {
         0;
        height: 0;
        color: transparent;
    }
    二,如何改变小程序单选/复选框的样式?
     
    tit:  在开发时,很多情况下我们需要使用单选/复选框,但是我们发现单选复选框的样式并不是我们想要的样式,我们可以通过如下设置实现wxss自定义单选/复选样式的修改。
     
    radio:
    /* 未选中的背景样式*/
    radio .wx-radio-input {
         40rpx;
        height: 40rpx;
        border-radius: 50%;
    }
    /* 选中后的背景样式*/
    radio .wx-radio-input.wx-radio-input-checked {
        background-color: #16cc80;
    }
    radio .wx-radio-input.wx-radio-input-checked::before {
         40rpx;
        height: 40rpx;
        border-radius: 50%;
        text-align: center;
        line-height:  40rpx;
        font-size:  30rpx;
        color: #fff;
        background-color: transparent;
        transform: translate(-50%,-50%) scale(1);
        -webkit-transform: translate(-50%,-50%) scale(1);
    }

    checkbox:

    /* 未选中的背景样式*/
    checkbox .wx-checkbox-input {
         40rpx;
        height: 40rpx;
        border-radius: 50%;
    }
    /* 选中后的背景样式*/
    checkbox .wx-checkbox-input.wx-checkbox-input-checked {
        background-color: #16cc80;
    }
    /*选中状态对勾的样式*/
    checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
         40rpx;
        height: 40rpx;
        border-radius: 50%;
        text-align: center;
        line-height:  40rpx;
        font-size:  30rpx;
        color: #fff;
        background-color: transparent;
        transform: translate(-50%,-50%) scale(1);
        -webkit-transform: translate(-50%,-50%) scale(1);
    }
  • 相关阅读:
    VDOM configuration
    Fortinet Security Fabric
    Gartner 2018 年WAF魔力象限报告:云WAF持续增长,Bot管理与API安全拥有未来
    installns
    vyos 基础配置
    vyatta的fork开源版本vyos
    vyos User Guide
    图论----同构图(详解)
    Educational Codeforces Round 21(A.暴力,B.前缀和,C.贪心)
    2017年中国大学生程序设计竞赛-中南地区赛暨第八届湘潭市大学生计算机程序设计大赛游记心得
  • 原文地址:https://www.cnblogs.com/bgwhite/p/9265800.html
Copyright © 2020-2023  润新知