HTML代码-背景图像
我在网页中添加了一些html代码,使背景更加突出。我不得不修改代码,使其在所有浏览器上都能工作,现在我已经破坏了它,有人能告诉我哪里出了问题吗HTML代码-背景图像,html,image,background-image,Html,Image,Background Image,我在网页中添加了一些html代码,使背景更加突出。我不得不修改代码,使其在所有浏览器上都能工作,现在我已经破坏了它,有人能告诉我哪里出了问题吗 <tr style= "background-color: #114e64; background-image: -webkit-gradient(linear,0% 0%, 0% 100%, color-stop(0%, #197192), color-stop(100%, #114e64)); background-image: -webkit
<tr style=
"background-color: #114e64;
background-image: -webkit-gradient(linear,0% 0%, 0% 100%, color-stop(0%, #197192), color-stop(100%, #114e64));
background-image: -webkit-linear-gradient(#197192,#114e64);
background-image: -moz-linear-gradient(#197192,#114e64);
background-image: -o-linear-gradient(#197192,#114e64);
background-image: linear-gradient(#197192,#114e64);"
height="45">
</tr>
谢谢这段代码对我来说很好用。 别忘了添加一个td标记以使表格单元格可见。 用您的代码看一下这个JSFIDLE:
测试对象
在这种情况下,请使用
将您的示例转换为类似以下内容以查找错误:
tr {background-color: #114e64;
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%,
color-stop(0%, #197192),
color-stop(100%, #114e64));
background-image: -webkit-linear-gradient(#197192, #114e64);
background-image: -moz-linear-gradient(#197192, #114e64);
background-image: -o-linear-gradient(#197192, #114e64);
background-image: linear-gradient(#197192, #114e64);
}
一旦检查出来,您可以将其转换回当前HTML标记的样式属性。您应该使用<table>
<tr>
<td style="background-color:#114e64;
background-image: -webkit-gradient(linear,0% 0%, 0% 100%, color-stop(0%, #197192), color-stop(100%, #114e64));
background-image: -webkit-linear-gradient(#197192,#114e64);
background-image: -moz-linear-gradient(#197192,#114e64);
background-image: -o-linear-gradient(#197192,#114e64);
background-image: linear-gradient(#197192,#114e64);"
height="45">
</tr>
</table>
以何种方式损坏?浏览器坏了,页面坏了?电脑坏了O对我来说很好>>我认为操作代码是正确的。它成功地通过了验证器(当然,供应商扩展的警告消息除外)。我的意图不是分发一条鱼,而是用来捕获一条鱼的工具。如果这值得一票否决,那就这样吧。
<table>
<tr>
<td style="background-color:#114e64;
background-image: -webkit-gradient(linear,0% 0%, 0% 100%, color-stop(0%, #197192), color-stop(100%, #114e64));
background-image: -webkit-linear-gradient(#197192,#114e64);
background-image: -moz-linear-gradient(#197192,#114e64);
background-image: -o-linear-gradient(#197192,#114e64);
background-image: linear-gradient(#197192,#114e64);"
height="45">
</tr>
</table>