【发布时间】:2016-05-23 13:30:34
【问题描述】:
我有以下 CSS 脚本需要帮助。当它在 PC 上看起来不错,但当它在移动设备上时它会拉伸。请问有什么我可以添加到它来保持纵横比的吗?
body {
font-family: 'Open Sans', sans-serif;
background:url(../images/bg.jpg) no-repeat center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
background-size: 100% 100%;
}
谢谢大家
罗伯
【问题讨论】:
标签: css image aspect-ratio