【发布时间】:2014-11-13 19:34:36
【问题描述】:
我有一些适用于 Chrome 和 Safari 的 CSS。唯一的问题是它在 Internet Explorer 和 Firefox 中不起作用。我想我在这里遗漏了一些东西。我正在使用的代码是以下 CSS:
.bg-img {
width: 100%;
height: 830px;
background-size: cover;
background-image: gradient(linear, left top, right bottom, color-stop(0%, rgba(223,237,202,0.9)), color-stop(100%, rgba(105,210,190,0.9))), url('../img/profileheader.jpg');
background-image: -moz-gradient(linear, left top, right bottom, color-stop(0%, rgba(223,237,202,0.9)), color-stop(100%, rgba(105,210,190,0.9))), url('../img/profileheader.jpg');
background-image: -webkit-gradient(linear, left top, right bottom, color-stop(0%, rgba(223,237,202,0.9)), color-stop(100%, rgba(105,210,190,0.9))), url('../img/profileheader.jpg');
background-position: center center;
}
HTML
<div class="bg-img"></div>
我需要 -ms-gradient 吗?我在没有必要的地方读到了。提前谢谢你!
【问题讨论】:
标签: html css internet-explorer firefox gradient