Opera Turbo and background-repeat doesn't work

痴心易碎 提交于 2019-12-11 07:06:28

问题


For example I have such a code:

<style>
body {
    background: url('back.png') repeat-y center;
}
</style>
<body>
</body>

It works fine in all browsers, include Opera. Looks like this:

But if Opera Turbo mode is turned on, than it looks like this:

Why is this, and can it be fixed? P.S. Opera 11.10 on Ubuntu 10.10


回答1:


To find why your images sometimes look like a mess in Opera Turbo, you should learn how Opera Turbo works (actually, what is Turbo mode).

As you know, Opera Turbo comes very handy for slow connections. To increase loading speed of web pages Opera Turbo compresses it's content. Smaller amount of data means quicker load.

There's root of this issue with your images.

According to documentation

When Opera Turbo is enabled, webpages are compressed via Opera's servers so that they use much less data than the originals. This means that there is less to download, so you can see your webpages more quickly.

So when you try to access some page using Turbo mode, Opera server takes data from original location (downloads complete webpage), compresses it on server side and send it compressed to you (or to any other Turbo's client).

Yeah, in Turbo mode image you can see is not original image, that's just compressed image from Opera server.

If you want to simulate this issue, try to convert that PNG image with Photoshop (or any other photo editor) into compressed JPEG format and you'll get something similar to your example from Opera Turbo.

Bandwidth optimization

Opera Turbo compresses Web traffic by up to 80% making the most of network resources and providing a better browsing experience.

In Turbo mode your images are compressed with low image quality setting (I guess 1-5). That makes them smaller size (with significant image quality loss) and that increases loading speed.

It is main purpose of Opera Turbo!

That was answer to first part of your question "Why is this". Answer on "can it be fixed" part is No, it can't be fixed. Why? Because Opera in Turbo mode doesn't work like any other normal browser.


Another quote:

When turned on, the Opera Turbo compresses the images and makes the loading very fast. I've a little idea of how this works and look forward to receiving well informed comments on how this mode works.

Typically, when you access any page, the browser will start fetching images from the server. With the Opera Turbo, the images will first be downloaded to Opera's servers and then compressed. The images will then be served to the browser.

On CrazyEngineers forum I also found this...

I tried the turbo mode on CrazyEngineers and the graphics (PNG files) look bit distorted.

That's exact same issue like this one you have.


References:
  • Opera Turbo Official Website
  • Opera Turbo (PDF document, filesize: 2.97 MB)
  • Faster Turbo in updated Opera
  • How Opera Turbo works?



回答2:


What Wh1T3h4Ck5 said is indeed correct, but there might be a solution for your problem: try making your image tile very small (both in pixels and file size) and repeat it along the x and y axis - that way, little can be gained from further compression, and there is a chance Opera Turbo will gloss over it and not try to compress it any further, hence preserving the intended effect.

Alternatively, you can try recreating the image using SVG, which will not be compressed at all - however, it's worth noting that not all browsers support setting SVG as a background image.



来源:https://stackoverflow.com/questions/5683201/opera-turbo-and-background-repeat-doesnt-work

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