Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在为安卓手机创建一个网络 abb。我有一张图片,它应该是所有页面的背景。我必须对所有页面使用幻灯片过渡。如果我在 CSS 中添加背景 url 选项,它不会覆盖整个屏幕。有什么方法可以使图像完全适合所有屏幕分辨率。
请帮帮我。
谢谢你。
我建议你使用css背景。
尽管如此,还有其他解决方案,但它们不会在旧的移动设备上运行(或运行良好)。原因,每个 jquery 解决方案都使用 position:fixed ,这可能会导致较旧的 android 设备出现问题。
如果您仍然愿意尝试看看这个:
jQuery插件1
jQuery插件2
当你设置你的 img 背景时试试这个。告诉我它是否有效。
background-size:100% 100%;
在css中设置这样的背景大小......
background-size: cover;
它会自动适应屏幕。