最近做项目发现IE9兼容css3中渐变属性,到了IE11居然反而不兼容,一开始一直用低版本的IE测试兼容性,才发现低版本IE兼容的IE11不一定兼容,后来解决方法是,在样式最前面加入background设置不渐变的颜色,这样一来当渐变样式不出现,也可以有个初始的背景颜色,不至于按钮背景为白色且字体为白色时候按钮看不见,下面粘贴样式代码:
background:
#88D8F6;
background:
-webkit-gradient(
linear,
left
top,
right
top,
color
-stop(
0,
#6BABFB),
color
-stop(
1,
#88D8F6));
background:
-ms-linear-gradient(
right,
#6BABFB,
#88D8F6);
background:
-o-linear-gradient(
#88D8F6,
#6BABFB);
filter: progid:DXImageTransform
.Microsoft.gradient(startColorstr
=
'#88D8F6', endColorstr
=
'#6BABFB', GradientType
=
0);
box-shadow:
none;
IE11下按钮样式