我知道这个问题是什么流行,但我不能得到它。我不太清楚css如何在多个浏览器上运行,抱歉。我试图使用在先前被剥夺主题的咨询方法,但我无法得到它。线性渐变不显示在IE 11
下面是用HTML CSS样式。我正在测试这https://html5-editor.net/。
.underlined {
height: auto;
width: auto;
position: relative;
border: 0;
}
.underlined:before {
width: 100%;
content: '';
position: absolute;
bottom: -2px;
height: 2px;
background:linear-gradient(to right, white, black);
background:-ms-linear-gradient(right, white, black)
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=white, endColorstr=black,GradientType=0);
}
.underlined:after {
width: 100%;
content: '';
position: absolute;
left: 2px;
bottom: -2px;
height: 0;
border-top: 2px dotted white;
}
.button {
background-color: #4CAF50;
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
}
<h2>CSS Buttons</h2>
<label class="underlined">Link Button</label>
<button class="underlined">Button</button>
<input type="button" class="button" value="Input Button">
这两件:
background:-ms-linear-gradient(right, white, black)
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=white, endColorstr=black,GradientType=0);
建议使用,但在11版IE浏览器,但它没有工作。 任何人都可以帮忙吗?
更新:我已经使用autoprefixer让我的css文件更好,我旁边的CSS:
.underlined {
height: auto;
width: auto;
position: relative;
border: 0;
}
.underlined:before {
width: 100%;
content: '';
position: absolute;
bottom: -2px;
height: 2px;
background:-webkit-linear-gradient(left, white, black);
background:linear-gradient(to right, white, black);
}
.underlined:after {
width: 100%;
content: '';
position: absolute;
left: 2px;
bottom: -2px;
height: 0;
border-top: 2px dotted white;
}
而且是,它并不在IE 11与按钮的工作原理我想我已经使用的所有建议,MB我想念什么? 好吧,如果线性渐变不工作的IE 11在所有的,我可以用一些替代品?
.Gradient doenst也有帮助 – Andrew
你缺少前过滤CSS属性分号。还可以使用'autoprefixer'来编写旧的浏览器兼容的CSS。 –
它does not帮助...(((((也(我也发现这个https://msdn.microsoft.com/library/hh801215(v=vs.85).aspx,似乎过滤器已被弃用在IE 10+ – Andrew