Opera Turbo 和背景重复不起作用

发布于 2024-11-02 04:38:50 字数 409 浏览 1 评论 0原文

例如我有这样的代码:

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

它在所有浏览器中都可以正常工作,包括 Opera。看起来像这样: 在此处输入图像描述

但是如果打开 Opera Turbo 模式,则看起来像这样: 在此处输入图像描述

这是为什么,可以修复吗? Ubuntu 10.10 上的 PS Opera 11.10

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:
enter image description here

But if Opera Turbo mode is turned on, than it looks like this:
enter image description here

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦屿孤独相伴 2024-11-09 04:38:50

要找出为什么您的图像有时在 Opera Turbo 中看起来很混乱,您应该了解 Opera Turbo 的工作原理(实际上,什么是 Turbo 模式)。

如您所知,Opera Turbo 对于慢速连接来说非常方便。为了提高网页的加载速度,Opera Turbo 会压缩其内容。数据量越小意味着加载速度越快。

您的图像存在此问题的根源。

根据文件

启用 Opera Turbo 后,网页
通过 Opera 服务器压缩,因此
他们使用的数据比
原件。这意味着有
下载量较少,因此您可以看到您的
更快地浏览网页。

因此,当您尝试使用 Turbo 模式访问某些页面时,Opera 服务器会从原始位置获取数据(下载完整的网页),在服务器端对其进行压缩并将其发送给您(或任何其他 Turbo 的客户端)。

是的,在 Turbo 模式下您看到的图像不是原始图像,那只是来自 Opera 服务器的压缩图像。

如果您想模拟此问题,请尝试使用 Photoshop(或任何其他照片编辑器)将该 PNG 图像转换为压缩的 JPEG 格式,您将得到与 Opera Turbo 中的示例类似的内容。

带宽优化

Opera Turbo 通过以下方式压缩 Web 流量
高达 80% 充分利用网络
资源并提供更好的
浏览体验。

在 Turbo 模式下,您的图像会以低图像质量设置进行压缩(我猜是 1-5)。这使得它们的尺寸更小(图像质量显着下降)并且提高了加载速度

这是 Opera Turbo 的主要目的!

这是对您问题“为什么是这样”的第一部分的回答。 “可以修复吗”部分的答案是不,无法修复。为什么?因为 Opera 在 Turbo 模式下的工作方式与任何其他普通浏览器不同。


Another quote:

打开后,Opera Turbo
压缩图像并使
加载速度非常快。我有一个小想法
这是如何运作的并期待
收到充分知情的评论
这种模式是如何工作的。

通常,当您访问任何页面时,
浏览器将开始获取图像
从服务器。有了 Opera Turbo,
图像将首先下载到
然后Opera的服务器进行压缩。
然后图像将被提供给
浏览器。

在 CrazyEngineers 论坛上我也发现了这个......

我尝试了涡轮模式
疯狂工程师和图形(PNG
文件)看起来有点扭曲。

这与您遇到的问题完全相同。


References:

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:

段念尘 2024-11-09 04:38:50

Wh1T3h4Ck5 所说的确实是正确的,但可能有一个解决方案可以解决您的问题:尝试使您的图像图块非常小(无论是像素还是文件大小)并沿 x 和 y 轴重复它 - 这样,就没有什么收获进一步压缩,并且 Opera Turbo 有可能会掩盖它并且不再尝试进一步压缩它,从而保留预期的效果。

或者,您可以尝试使用 SVG 重新创建图像,它根本不会被压缩 - 但是,值得注意的是,并非所有浏览器都支持将 SVG 设置为背景图像。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文