我有一个css规则,工作在chrome,firefox和过去工作在IE。现在,我看似有效的css不起作用了。
.s-tour {
/*border-radius: 5px;*/
margin: 0 auto;
width: 250px;
height: 200px;
line-height: 100px;
font-weight: 600;
font-size: 18px;
box-shadow: 0 0 7px rgba(1, 1, 1, .8);
border: solid thin #555;
color: #E0E0E0;
background: #555;
background-image: linear-gradient(to bottom, #555 0%, #eee 100%);
background-image:-webkit-linear-gradient(top, #777, #666);
background-image: -ms-linear-gradient(top,#555555 0%,#666666 100%);
background-image:-o-linear-gradient(top, #777, #666);
background-image:-moz-linear-gradient(top, #777, #666);
}我觉得background-image: linear-gradient(to bottom, #555 0%, #eee 100%);或-ms-background-image: linear-gradient(top,#555555 0%,#666666 100%);都应该为IE 11工作,但是IE检查员会在它下面加上一条模糊的红线,以及我尝试过的其他任何东西。
我检查了谷歌页面上的工作梯度,background-image: -ms-linear-gradient(top,#f5f5f5,#f1f1f1);运行得很好,但是即使是这一行也不能在我的网站上工作。
我尝试了所有我能想到的属性、前缀和值的变体,包括堆栈溢出的所有相关答案,现在我感到困惑,不知道它是DOM问题、bug还是一些简单的东西。
发布于 2014-10-23 06:13:11
尝试将这一行添加到您的类的末尾:
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#555555, endColorstr=#666666);发布于 2014-10-23 07:13:14
因此,我真正遇到的问题是,我没有告诉IE使用最新的css标准来呈现页面。将<meta http-equiv="X-UA-Compatible" content="IE=Edge" />添加到<head>块解决了我的大部分问题。
发布于 2016-05-06 13:00:30
在IE11中,对我起作用的是正确使用CSS3线性梯度属性(gradients.asp)。
举个例子:
background: linear-gradient(to bottom, #FFF 0%, #EEE 100%);在此之后,我不需要使用任何元标记或旧的过滤器语法。
https://stackoverflow.com/questions/26522101
复制相似问题