css美化range拖动范围取值器样式代码

代码语言:html

所属分类:其他

代码描述:css美化range拖动范围取值器样式代码

代码标签: css 美化 range 拖动 范围 取值器 代码 样式

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Custom Range Slider</title>
    <style>
    body{
        background: white;
        padding: 100px;
    }
        .range-container {
            position: relative;
            width: 300px;
            margin: 50px auto;
        }

        input[type="range"] {
            -webkit-appearance: none;
            width: 100%;
            height: 10px;
            background: #ddd;
            outline: none;
            opacity: 0.7;
            transition: opacity .2s;
            border-radius: 5px;
        }

        input[type="range"]:hover {
            opacity: 1;
        }

        input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            background: #4CAF50;
            cursor: pointer;
            border-radius: 50%;
        }

        input[type="range"]::-moz-range-thumb {
            width: 20px;
            height: 20px;
            .........完整代码请登录后点击上方下载按钮下载查看

网友评论0