我为 webkit 背景图像创建了以下线性渐变:-webkit-repating-linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 62px, black 62px, black 63px);
但我不确定如何在歌剧、Mozilla 等中创建相同的样式。有人可以建议如何实现吗?
问问题
17 次
2 回答
1
background: -moz-linear-gradient(top, rgba(0,0,0,1) 62px, rgba(0,0,0,1) 63px); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(62px,rgba(0,0,0,1)), color-stop(63px,rgba(0,0,0,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(0,0,0,1) 62px,rgba(0,0,0,1) 63px); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(0,0,0,1) 62px,rgba(0,0,0,1) 63px); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(0,0,0,1) 62px,rgba(0,0,0,1) 63px); /* IE10+ */
background: linear-gradient(to bottom, rgba(0,0,0,1) 62px,rgba(0,0,0,1) 63px); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#000000', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
于 2013-07-25T10:58:12.733 回答
0
现在拿这个
.mydiv {
background-image: -webkit-linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 62px, black 62px, black 63px);
-moz-webkit-linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 62px, black 62px, black 63px); // for firefox
-o-webkit-linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 62px, black 62px, black 63px); // for opera
}
于 2013-07-25T10:27:57.997 回答