我正在尝试使用笔记本外观创建文本区域。当键入后滚动出现时,我希望笔记本背景与文本一起滚动。
似乎background-attachment: local
无法使用FF,即使应该支持它。
textarea{
width: 300px;
resize: none;
display: block;
height: 200px;
line-height: 40px;
font-size: 16px;
font-family: ProximaNova-Regular;
border: 0;
padding: 0 10px;
border: none;
line-height: 40px;
overflow-y: auto;
background-image: -webkit-linear-gradient(left, #fff 0, transparent 0),-webkit-linear-gradient(right, #fff 0, transparent 0),-webkit-linear-gradient(#fff 29px, #91D1D3 29px, #91D1D3 30px, #fff 30px);
background-image: -moz-linear-gradient(left, #fff 0, transparent 0),-moz-linear-gradient(right, #fff 0, transparent 0),-moz-linear-gradient(#fff 29px, #91D1D3 29px, #91D1D3 30px, #fff 30px);
background-image: -ms-linear-gradient(left, #fff 0, transparent 0),-ms-linear-gradient(right, #fff 0, transparent 0),-ms-linear-gradient(#fff 29px, #91D1D3 29px, #91D1D3 30px, #fff 30px);
background-image: linear-gradient(left, #fff 0, transparent 0),linear-gradient(right, #fff 0, transparent 0),linear-gradient(#fff 29px, #91D1D3 29px, #91D1D3 30px, #fff 30px);
background-repeat: repeat-y;
background-size: 100% 100%, 100% 100%, 100% 40px;
background-attachment: local;
font-size: 16px;
color: #444;
}