zoukankan      html  css  js  c++  java
  • CSS修改input[type=range]滑块样式

    input[type="range"]是html5中的input标签新属性,样子如下:

    <input type="range" value="40" />

    如果想让此滑块效果如下图所示,怎么做呢?

    以下是样式部分:

    <style type="text/css">
                input[type="range"] 
    {
                    -webkit-box-shadow
    : 0 1px 0 0px #424242, 0 1px 0 #060607 inset, 0px 2px 10px 0px black inset, 1px 0px 2px rgba(0, 0, 0, 0.4) inset, 0 0px 1px rgba(0, 0, 0, 0.6) inset;
                    margin-top
    : 2px;
                    background-color
    : #272728;
                    border-radius
    : 15px;
                    width
    : 400px;
                    -webkit-appearance
    : none;
                    height
    :10px;
                
    }
                input[type="range"]::-webkit-slider-thumb 
    {
                    -webkit-appearance
    : none;
                    cursor
    : default;
                    top
    : -5px;
                    height
    : 30px;
                    width
    : 20px;
                    transform
    : translateY(-4px);
                    background
    : none repeat scroll 0 0 #777;
                    border-radius
    : 15px;
                    -webkit-box-shadow
    : 0 -1px 1px black inset;
                
    }
            </style>
  • 相关阅读:
    P1990 覆盖墙壁题解
    golang学习笔记---在接口和类型之间转换
    golang学习笔记 --- HTTP 客户端
    golang学习笔记 ----interface(接口3)
    golang学习笔记---上下文 context
    golang学习笔记 ----interface(接口)
    golang学习笔记---channel&goroutine
    golang学习笔记---select(3)
    golang 学习笔记 ---select关键字用法
    golang学习笔记---channel(2)
  • 原文地址:https://www.cnblogs.com/dzlishen/p/4511092.html
Copyright © 2011-2022 走看看