Html 创建跨浏览器背景渐变
也许是个愚蠢的问题,但我需要一些帮助Html 创建跨浏览器背景渐变,html,css,background,gradient,Html,Css,Background,Gradient,也许是个愚蠢的问题,但我需要一些帮助 我正在创建一个网站,我注意到这段代码用于背景渐变 background:-webkit渐变(线性、左上、左下、从(rgba(180、180、180、0))到(#E7E7E7)) 只能在谷歌chrome浏览器中使用,在其他浏览器中它看起来不像我想要的,所以有人有一些建议吗 标准语法是 线性梯度(向右,rgba(180,180,180,0),#E7E7E7); 正文{ 背景图像:线性渐变(向右,rgba(180,180,180,0),#E7E7E7); }标
我正在创建一个网站,我注意到这段代码用于背景渐变
background:-webkit渐变(线性、左上、左下、从(rgba(180、180、180、0))到(#E7E7E7))代码>
只能在谷歌chrome浏览器中使用,在其他浏览器中它看起来不像我想要的,所以有人有一些建议吗
标准语法是
线性梯度(向右,rgba(180,180,180,0),#E7E7E7);
正文{
背景图像:线性渐变(向右,rgba(180,180,180,0),#E7E7E7);
}
标准语法是
线性梯度(向右,rgba(180,180,180,0),#E7E7E7);
正文{
背景图像:线性渐变(向右,rgba(180,180,180,0),#E7E7E7);
}
所有浏览器都需要前缀
对于此示例,请使用:
background: #b4b400; /* Old browsers */
background: -moz-linear-gradient(top, #b4b400 0%, #e7e7e7 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b4b400), color-stop(100%,#e7e7e7)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #b4b400 0%,#e7e7e7 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #b4b400 0%,#e7e7e7 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #b4b400 0%,#e7e7e7 100%); /* IE10+ */
background: linear-gradient(to bottom, #b4b400 0%,#e7e7e7 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b4b400', endColorstr='#e7e7e7',GradientType=0 ); /* IE6-9 */
可以在同一生成器上使用所有前缀创建渐变,例如:
所有浏览器都需要前缀
对于此示例,请使用:
background: #b4b400; /* Old browsers */
background: -moz-linear-gradient(top, #b4b400 0%, #e7e7e7 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b4b400), color-stop(100%,#e7e7e7)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #b4b400 0%,#e7e7e7 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #b4b400 0%,#e7e7e7 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #b4b400 0%,#e7e7e7 100%); /* IE10+ */
background: linear-gradient(to bottom, #b4b400 0%,#e7e7e7 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b4b400', endColorstr='#e7e7e7',GradientType=0 ); /* IE6-9 */
可以在同一生成器上使用所有前缀创建渐变,例如:
你能给我写一些这方面的示例代码吗?你能给我写一些这方面的示例代码吗?