我最近一直在尝试制作一个使用重复线性渐变来分隔行的文本区域,但是,当我滚动时渐变不会附加到文本框。难道我做错了什么?
顺便说一句,这是代码:
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
<div class="TextareaWrapper"><textarea id="Text" cols="1500"></textarea></div>
</body>
</html>
<style>
#Text
{
background: url("https://www.linkpicture.com/q/2cOaJ-2.png");
background-size: 30px 33325px;
background-position: 0px 11px;
background-attachment: local;
background-repeat: no-repeat;
padding-left: 35px;
padding-top: 10px;
border-color:#ccc;
font-size: 15px;
display: block;
margin: 0px;
line-height: 1.5;
width: 400px;
height: 225px
}
.TextareaWrapper
{
display: inline-block;
background-image: repeating-linear-gradient(to bottom, #ffffff, #f0f0f0 50%);
background-attachment: local;
background-size: 100% 45px;
background-position: left 10px;
}
</style>
<script>
</script>
另外,这里是我使用的一些 URL: