我想要一个像下面这样的div.Something的渐变底色,它可以在css3中使用,或者应该使用图像。
任何可能的帮助。
发布于 2012-06-29 17:38:01
是和否。
是的,这是可能的。像http://www.colorzilla.com/gradient-editor/这样的工具使得创建CSS3代码变得容易。例如,这就是您想要的:http://www.colorzilla.com/gradient-editor/#ffffff+75,cccccc+100;Custom
不,您应该始终有一个用于渐变的回退图像。并不是所有的浏览器都支持它,也不是所有的浏览器都同样支持它。
发布于 2016-03-07 18:32:33
这将仅在元素的底部创建渐变,并且不会随着元素的高度拉伸。它是固定的100px。
.style {
padding-bottom:100px;
background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 50%, rgba(0,0,0,0.1) 100%); /* FF3.6-15 */
background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 50%,rgba(0,0,0,0.1) 100%); /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 50%,rgba(0,0,0,0.1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
background-position: center bottom;
background-size: 100px 100px;
background-repeat: repeat-x;
}https://stackoverflow.com/questions/11259382
复制相似问题