是否可以使用css2生成渐变?
注:-无背景图像
发布于 2012-08-08 22:40:11
不是的。只在CSS3中使用普通的CSS,但你可能会发现这很有用:
http://www.colorzilla.com/gradient-editor/
它生成与许多不同浏览器兼容的渐变。您只需将生成的CSS粘贴到您的工作表中。这样你就不需要在你的背景上加载图片了。
发布于 2012-08-08 22:40:02
不,但这是最好的跨浏览器方法:
background-color: #ccc; // If gradients are not supported by browser
background-image: linear-gradient( bottom, #ccc 0%, #ddd 100% );
background-image: -o-linear-gradient( bottom, #ccc 0%, #ddd 100% );
background-image: -moz-linear-gradient( bottom, #ccc 0%, #ddd 100% );
background-image: -webkit-linear-gradient( bottom, #ccc 0%, #ddd 100% );
background-image: -ms-linear-gradient( bottom, #ccc 0%, #ddd 100% );
background-image: -webkit-gradient( linear, left bottom, left top, color-stop(0, #ccc), color-stop(1, #ddd) );https://stackoverflow.com/questions/11866816
复制相似问题