我正在尝试在右侧创建一个带有渐变和背景图像的跨度。现在,我已经搜索了很长时间,并且一直在添加代码段。一切正常,直到我测试了IE8。我在堆栈溢出时发现的与我的问题相关的已回答问题仍然无法为我解决。这是代码:
background: #FFFFFF;
background-image: url(../images/selectArrows.png) center center no-repeat; /* fallback */
background-image: url(../images/selectArrows.png), -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#ededed)); /* Saf4+, Chrome */
background-image: url(../images/selectArrows.png), -webkit-linear-gradient(top, #ffffff, #ededed); /* Chrome 10+, Saf5.1+ */
background-image: url(../images/selectArrows.png), -moz-linear-gradient(top, #ffffff, #ededed); /* FF3.6+ */
background-image: url(../images/selectArrows.png), -ms-linear-gradient(top, #ffffff, #ededed); /* IE10 */
background-image: url(../images/selectArrows.png), -o-linear-gradient(top, #ffffff, #ededed); /* Opera 11.10+ */
background-image: url(../images/selectArrows.png), linear-gradient(to bottom, #ffffff, #ededed); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="#FFFFFF", endColorstr="#ededed",GradientType=0 ), progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../images/selectArrows.png");
background-repeat: no-repeat;
background-position: 100% 50%;
最佳答案
我建议您使用这个很棒的背景编辑器:http://www.colorzilla.com/gradient-editor/
您可以上传selectArrows.png
并从中导入背景。它将为您提供可以使用的确切CSS,跨浏览器!
关于html - IE8渐变和图片,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/23313518/