【问题标题】:background-attachment: local; CSS style not working in Firefox背景附件:本地; CSS 样式在 Firefox 中不起作用
【发布时间】:2020-02-10 02:15:10
【问题描述】:

我正在尝试为每一行显示一个行号。我的代码在 Chrome 中正常工作,但在 Firefox 中由于 background-attachment: local; 它无法正常工作在 Firefox 中不接受。我希望它可以在两种浏览器中运行。

JsFiddlehttps://jsfiddle.net/k8go4d5b/

这是我的代码:

<!DOCTYPE html>
<html>
<head>
<style>
textarea{
    background: url(http://i.imgur.com/2cOaJ.png);
background-attachment: local;
background-repeat: no-repeat;
padding-left: 35px;
padding-top: 10px;
    border-color:#ccc;
}
</style>
</head>
<body>

<textarea rows="10" cols="40"></textarea>

</body>
</html>

【问题讨论】:

标签: css background-attachment


【解决方案1】:

它适用于 Firefox。检查你使用的版本,here you can find the allowance of this resource in firefox

希望这会有所帮助。 :D

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-07-17
    • 2016-09-22
    • 2017-01-30
    • 1970-01-01
    • 1970-01-01
    • 2019-07-12
    • 1970-01-01
    • 2017-03-13
    相关资源
    最近更新 更多