html - 我的网页在 IE 和 Firefox 中不工作

标签 html css

我在页面中有一个 slider ,它在 chrome 浏览器中运行良好,但在 IE 或 firefox 中不起作用,但我希望它在所有浏览器(IE、firefox 和 chrome)上运行。 我还编写了 javascript oninput() 函数,我希望它能在上述所有浏览器上运行。

<html>
<head>
<style>
input[type=range] {
-webkit-appearance: none;
background-color: transparent;
width: 300px;
height: 20px;
  padding-top:10px;
  overflow:hidden;
  display: inline-block;
  vertical-align: middle;
}
input[type=range]:focus{
  outline:none;
}
input[type="range"]::-webkit-slider-thumb {
  position:relative;
     -webkit-appearance: none;
    cursor:pointer;
    background-color: #f1f1f1;
    width: 10px;
    height: 30px;
    box-shadow: 1px 5px 10px -1px rgba(0, 0,0.2),
    -25px 0 0 20px rgba(0,0,255,0.3),
    -75px 0 0 20px rgba(0,0,255,0.3),
    -125px 0 0 20px rgba(0,0,255,0.3),
    -175px 0 0 20px rgba(0,0,255,0.3),
    -225px 0 0 20px rgba(0,0,255,0.3),
    -275px 0 0 20px rgba(0,0,255,0.3),
    -325px 0 0 20px rgba(0,0,255,0.3);
  z-index:2;
}
input[type="number"] {
    width: 80px;
    height: 20px;
        background-color: #f1f1f1;
}
input[type=number]:focus{
  outline:none;
}
.number-wrapper {
    position: relative;
}
</style>
</head>
<body>
<form align=center>
Length<br><input type="range" id="Minlen_range" name="MinlenRange" min="1" max="100" value=10 oninput="this.form.MinlenInput.value=this.value" />
<input type="number" id="Minlen_text" name="MinlenInput" min="1" max="100" value=10 oninput="this.form.MinlenRange.value=this.value">
</form>
</body>
</html>

最佳答案

这是因为您正在使用 -webkit-slider-thumb。它适用于基于 Webkit 的客户端,IE 和 Firefox 使用其他引擎,它们忽略了这一点。

关于html - 我的网页在 IE 和 Firefox 中不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57921068/

相关文章:

html - Bootstrap 4 导航栏高度 sass 变量丢失了吗?

html - 将 div 移动到 float 元素的右侧,但在另外两个元素的下方

Html5 路径对齐问题阿拉伯语版本

html - 我如何使我的响应式表单居中并与其他所有内容均匀对齐?

javascript - 如何在可用时使 Angular.js 应用离线并与服务器同步

html - 是否可以在 css 内容中一个一个地使用两个图标

javascript - 动态加载的 css 不设置宽度属性

html - Bootstrap,h1 覆盖在容器内的背景图像上

javascript - 使用 HTML/Javascript 访问动态创建的 div 中的元素

javascript - 为什么js文件中的变量值被删除。当我打开 jquery fancy box 时?