【发布时间】:2019-09-02 17:40:57
【问题描述】:
我有一个在 chrome、firefox 中运行良好的 css 规则,并且曾经在 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 问题还是错误或简单的东西。
【问题讨论】:
-
可以使用this site生成
css gradient
标签: html css internet-explorer