简体   繁体   English

Safari无法扩展背景?

[英]Safari doesn't scale background?

Im having a problem in Safari, that it doensn't scale the background - It works perfectly in Firefox, Chrome and so on, just safari that's the problem... You can see it here: http://wearewebstars.dk/frontend/test/theme-front.html 我在Safari中遇到问题,它无法缩放背景-在Firefox,Chrome等设备中完美运行,只是野生动物园就是问题所在……您可以在此处查看: http : //wearewebstars.dk/frontend /test/theme-front.html

It happens when you have a resolution that is under 1280px - Any ideas to that's wrong? 当您的分辨率低于1280像素时,就会发生这种情况-有什么想法不对吗?

在此处输入图片说明

The background is set like this: 背景设置如下:

body#front-themepage {  background: transparent url(assets/css/img/themes/bg-front.jpg) top center no-repeat; width:100%;  }

I've also tried background-size:cover - And background-size: 100%, 100%, but it doenst work :( 我也尝试过background-size:cover-和background-size:100%,100%,但这确实有效:(

Safari, and Chrome in some cases, require -webkit- to be specified for CSS selectors. Safari和Chrome(在某些情况下)要求为CSS选择器指定-webkit-。 This is for no reason other than Apple's design, and is (probably) no fault of your own. 这不是Apple设计的原因,而且(可能)不是您自己的错。 In all likelihood, this is the issue, but it may also be caused by something you have not displayed. 这很可能是问题所在,但也可能是由于您未显示的内容引起的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM