我正在尝试创建一个网站,并希望确保所有的浏览器,但我的CSS不在IE中工作,请告诉我的CSS有什么问题。 哪个在IE中不支持 我的CSS
.ui-widget-header {
border: 1px solid #E1712B !important;
background-image:linear-gradient(to bottom, #F8B84B 30%,#F7AF39 70%);
color: #ffffff;
font-weight: bold;
}
答案 0 :(得分:0)
我已经尝试过我的IE并且工作了。我添加了宽度和高度:
.ui-widget-header {
border: 1px solid #E1712B !important;
background-image:linear-gradient(to bottom, #F8B84B 30%,#F7AF39 70%);
color: #ffffff;
font-weight: bold;
width:100px;
height:100px;
}
这里是jsfiddle:http://jsfiddle.net/oLcfcfvL/
对于旧版本,您可以尝试渐变生成器:
答案 1 :(得分:0)
如果我看对了,你有背景问题。您需要为线性渐变使用多于1个属性:
在<head>
上添加:
<!--[if gte IE 9]>
<style type="text/css">
.ui-widget-header{
filter: none;
}
</style>
<![endif]-->
在CSS中:
.ui-widget-header {
border: 1px solid #E1712B !important;
background: #f8b84b; /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIzMCUiIHN0b3AtY29sb3I9IiNmOGI4NGIiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSI3MCUiIHN0b3AtY29sb3I9IiNmN2FmMzkiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
background: -moz-linear-gradient(top, #f8b84b 30%, #f7af39 70%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(30%,#f8b84b), color-stop(70%,#f7af39)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #f8b84b 30%,#f7af39 70%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #f8b84b 30%,#f7af39 70%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #f8b84b 30%,#f7af39 70%); /* IE10+ */
background: linear-gradient(to bottom, #f8b84b 30%,#f7af39 70%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f8b84b', endColorstr='#f7af39',GradientType=0 ); /* IE6-8 */
color: #ffffff;
font-weight: bold;
}