修改系统默认样式

自定义(滑动条) 

\small -webkit-appearance  可以去除浏览器默认样式,但却是一个不规范的属性(unsupported WebKit property),

它没有出现在 CSS 规范草案中,此属性非标准且渲染效果在不同浏览器下不同,有些属性值甚至不支持,请慎用。

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    margin: 0;
    background: transparent;
}

input[type="range"]:focus {
    outline: none;
}

/*滑道*/
input[type="range"]::-webkit-slider-runnable-track {
    background: transparent;
    border: none;
}

/*滑块*/
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-bottom: 15px;
    background-color: transparent;
    box-shadow: 0 0 0 3px white, 0 1px 3px 3px rgba(5, 10, 70, 0.33);
}

自定义(滚动条)

/*滑道*/
::-webkit-scrollbar-track
{
    border-radius: 10px;

    background-color: #fff;

    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
}

/*滑动条*/
::-webkit-scrollbar
{
    width: 7px;

    background-color: #fff00;
}

/*滑块*/
::-webkit-scrollbar-thumb
{
    border-radius: 10px;

    background-color: #b3b3b3;
    
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);

    /*background:linear-gradient(to bottom,red,#ffe607,#fffa04,#0fff4e,#00a1ff,#ef00ff); */
}

自定义(单选框)

        input[type="radio"] {
            appearance: none;
            -webkit-appearance: none;
            outline: none;
            margin: 0;
        }

        input[type="radio"]:after {
            display: block;
            content: "";
            width: 12px;
            height: 12px;
            background: #fff;
            border-radius: 50%;
            border: 2px solid #bfbfbf;
        }

        /*已选择*/
        input[type="radio"]:checked:after {
            background: #0593d3;
            border: 2px solid #fff;
        }

                                                                                                                                                                \small \small By\ \ Nidhogg\cdot D\cdot Joking

转载于:https://www.cnblogs.com/NidhoggDJoking/p/10547451.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值