为什么背景附件本地不适用于Android和IOS

时间:2016-08-01 15:37:14

标签: html css css3 jquery-ui mobile-safari

我正在尝试使用带有文本区域内容滚动的背景,我发现背景附件本地执行我需要的功能,它在Chrome和Safari上工作得很完美但是当我在IOS和Android设备上尝试它时它不会工作,任何想法如何解决这个问题,这就是我想要做的:

.box{
    background: #ebebeb url("https://d1bys27s0mpm5v.cloudfront.net/static/images/underline.3bf1ed0760e9.png") repeat;
    background-attachment: local;
    border: none;
    box-shadow: none;
    line-height: 30px;
    font-size:24px;
    font-family: CeraCY-Regular;
    padding: 4px;
    resize: none;
    border-radius: 1px;
    height: 300px;
    width: 300px;
}
<textarea class="box">
  Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</textarea>

1 个答案:

答案 0 :(得分:1)

根据can I use

  • Android浏览器根本不支持local
  • Chrome for Android仅在设置border-radius时支持
  • 适用于iOS的Safari仅在未使用-webkit-overflow-scrolling: touch时支持

简而言之,它是一项前沿功能,而且尚未完全支持。