Android chrome : Background with “background-size: cover;”

允我心安 提交于 2019-12-13 20:21:49

问题


I put a background on my homepage. It is correctly displayed on all browsers except on android chrome. Here is my css :

body.path-frontpage {
    background-image: url("/themes/contrib/bootstrap_subtheme_front_office/images/background.svg");
    background-attachment: fixed;
    background-size: cover;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

Here is my homepage :

https://www.s1biose.com/


回答1:


I ran into the same problem not too long ago. I fixed it by using thr inline style in html. Apart from that I also found a thread where people post their approach to solve this I think you should check it out too!

background-size: cover not working in portrait on Android tablet



来源:https://stackoverflow.com/questions/45620270/android-chrome-background-with-background-size-cover

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!