输入范围在ie或edge中不起作用 [英] input range not working in ie or edge

查看:99
本文介绍了输入范围在ie或edge中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否还有其他人遇到此问题,您有解决方案吗?

Has anyone else come across this issue and do you have a solution.

在ie和edge中使用此html不会显示范围.

Using this html in ie and edge the range doesn't show.

<html>
    <head>
        <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
        <link type="text/css" href="/static/css/bootstrap.min.css" rel="stylesheet">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
        <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

    </head>
    <body>
        <div class="container">    
            <div class="row">
                <div class="col-sm-4">
                    <form method="post" action="/Tactics">
                        <table align="center" width="100%">
                            <tr><td>stuff</td><td><input type="range" min="10" max="50"></td></tr>
                            <tr><td>stuff</td><td><input type="range" min="10" max="50"></td></tr>
                        </table>
                    </form>
                </div>
            </div>
        </div>
    </body>
</html>

如果您为表中的每一行取出第一行内容,则输入范围将再次起作用.在crome,firefox和Opera中都可以.

If you take out the first stuff for each row in the table the input range works again. It's fine in crome, firefox and opera.

有人看到过这个吗,你知道如何解决吗?

Has anyone seen this and do you know how to fix?

推荐答案

添加MS填充物:

input[type=range]::-ms-track {
/*example */
width: 250px;height: 10px;
background: transparent;
border-color: transparent;
border-width: 6px 0;
color: transparent;
}

input[type=range]::-ms-fill-upper {
background: gray;
border-radius: 6px;
}
input[type=range]::-ms-fill-lower {
background: gray;
border-radius: 6px;
}

这只是示例,但您需要重点关注以下内容:

This is just example but you need to focus on these:

    input[type=range]::-ms-track
    input[type=range]::-ms-thumb
    input[type=range]::-ms-fill-upper
    input[type=range]::-ms-fill-lower

检查 FIDDLE

这篇关于输入范围在ie或edge中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆