背景尺寸:盖不工作在Android原生浏览器 [英] background-size:cover not working in android native browser
问题描述
我想这是一个使用背景大小的容器,以适应背景图片:覆盖
。
这是我的小提琴:小提琴
I'm trying to fit a background image to it's container using background-size:cover
.
here is my fiddle : The Fiddle
它工作在所有的浏览器,但没有工作在Android原生浏览器.. 任何人有任何解决办法吗?谢谢
it works in all browsers but not working in Android native browser.. anybody has any solution please ? thanks
推荐答案
搜索关于这个问题,并发现没有解决方案之后,我删除了CSS文件样式的背景图像和使用HTML codeS内联样式。与Android原生浏览器的问题就解决了。
After searching about this problem and finding no solution, I deleted background-image from CSS file styles and used an inline style in HTML codes. The problem with android native browser is solved.
我更新了小提琴和它在Android原生浏览器的工作。
I updated the fiddle and it's working in android native browser.
似乎机器人也有问题,这样的解析背景格式:
it seems that android also has problem with parsing background format like this :
background: url('...') fixed center center / cover;
和我们应该将背景图片的形式等,并用它内联,然后在css文件单独使用的每个选项,像这样的:
and we should separate the background-image form others and use it inline, and then use each option separately in css file, like this :
background-size: cover;
background-position: center center;
这篇关于背景尺寸:盖不工作在Android原生浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!