3 html css internet-explorer css3
有人请告诉我Internet Explorer,世界上最常用的网页浏览器支持html元素的渐变!
我有这个:
/* default background colour, for all layout engines that don't implement gradients */
background: #2a6da9;
/* gecko based browsers */
background: -moz-linear-gradient(top, #55aaee, #003366);
/* webkit based browsers */
background: -webkit-gradient(linear, left top, left bottom, from(#55aaee), to(#003366));
color: #000000; /* text colour (black) */
height: auto; /* gradient uses the full height of the element */
padding: 5px; /* distance from border edge to text */
Run Code Online (Sandbox Code Playgroud)
...在我使用过的每个浏览器中都能很好地工作,除了Internet Explorer!Internet Explorer,即使是最新版本(9 beta和9RC1)也不会出现支持梯度!
到目前为止,我在网上看到的只是教程,告诉我使用具有渐变效果的背景图像,并在其上执行repeat-x.
有谁知道在IE中获得渐变支持的方法?(没有图像)
谢谢 :)
以下是IE的渐变过滤器示例...
http://robertnyman.com/2010/02/15/css-gradients-for-all-web-browsers-without-using-images/
该片段显示:
/* For Internet Explorer 5.5 - 7 */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#FF0000FF, endColorstr=#FFFFFFFF);
/* For Internet Explorer 8 */
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#FF0000FF, endColorstr=#FFFFFFFF)";
Run Code Online (Sandbox Code Playgroud)
但我总是只使用1px宽的渐变切片.