[英]CSS rgba in Internet Explorer
I have box with RGBa
opacity background. 我的盒子有
RGBa
不透明度背景。 It works in all browsers except IE. 它适用于除IE之外的所有浏览器。 I tried it on IE 8. IE show page without background (rgba color).
我在IE 8上尝试过它。IE显示页面没有背景(RGBA颜色)。 I tried ms filter:
我尝试了ms过滤器:
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#50990000,endColorstr=#50990000);
zoom: 1; 缩放:1; and -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
和-ms-filter:“ progid:DXImageTransform.Microsoft.Alpha(Opacity = 30)”; it do not work.
它不起作用。 This is my background code:
这是我的背景代码:
background-image: -webkit-linear-gradient(270deg,rgba(238,242,243,0.65) 30.57%,rgba(239,239,239,0.89) 100%); background-image: linear-gradient(180deg,rgba(238,242,243,0.65) 30.57%,rgba(239,239,239,0.89) 100%);
and full code of box: 和盒子的完整代码:
.box1 {
height: 1100px;
width: 800px;
margin-right: auto;
margin-left: auto;
background-size: cover;
background-repeat: repeat;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0px;
-moz-box-shadow: 20px 20px 20px #CCC;
-webkit-box-shadow: 20px 20px 20px #CCC;
box-shadow: 20px 20px 20px #CCC;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
background-image: -webkit-linear-gradient(270deg,rgba(238,242,243,0.65) 30.57%,rgba(239,239,239,0.89) 100%);
background-image: linear-gradient(180deg,rgba(238,242,243,0.65) 30.57%,rgba(239,239,239,0.89) 100%);}
In order for IE8 to work with the CSS RGBa property, you need to place the IE8 syntax at the beginning of your RGBa entries; 为了使IE8使用CSS RGBa属性,您需要将IE8语法放在RGBa条目的开头。 before any webkit or standards-compliant entries:
在任何Webkit或符合标准的条目之前:
/* IE8 */
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#50990000,endColorstr=#50990000)";
/* Other Browsers */
-webkit-linear-gradient(270deg,rgba(238,242,243,0.65) 30.57%,rgba(239,239,239,0.89) 100%);
linear-gradient(180deg,rgba(238,242,243,0.65) 30.57%,rgba(239,239,239,0.89) 100%);
/* IE9+ */
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#50990000,endColorstr=#50990000);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.