【问题标题】:SASS background issue in iPhone and iPad [duplicate]iPhone和iPad中的SASS背景问题[重复]
【发布时间】:2014-12-09 18:02:19
【问题描述】:

我在使用 sass 中的 background 属性时遇到问题

当我写作时:

background: url(../images/assets/calendar.png);
background-repeat: no-repeat;
background-size: 250px 230px;
background-position: 51px 91px;
background-color: $mainColor;

sass 编译它用于:

background: url(../images/assets/calendar.png) 51px 91px/250px 230px no-repeat #f68e34;

但是,iPhone 和 iPad 浏览器不理解这个语法,我该如何解决呢?

提前致谢

【问题讨论】:

  • 提供的 Sass 无法编译为该 CSS。

标签: iphone css ipad sass


【解决方案1】:

您是否尝试过使用background-image 而不是background 速记?

如果你写出每条规则 iOS/Safari 会理解的。

background-image: url(../images/assets/calendar.png);
background-repeat: no-repeat;
background-size: 250px 230px;
background-position: 51px 91px;
background-color: $mainColor;

【讨论】:

  • 我怎么没想到?大声笑 - 非常感谢!
  • 不客气,很高兴它成功了。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-05
  • 2012-11-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多