Firefox 12 html元素不会缩小到376px以下 [英] Firefox 12 html element won't shrink below 376px

查看:118
本文介绍了Firefox 12 html元素不会缩小到376px以下的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在顶部中心创建了一个背景图片的HTML5页面。

I have just created an HTML5 page with a background image in the top center.

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Example</title>
        <link rel="stylesheet" href="style.css">
    </head>
    <body>
        <p>Example</p>
    </body>
</html>

使用以下CSS:

body 
{
    background-image: url('images/bg.png');
    background-position: top center;
    background-repeat: no-repeat;
    margin: 0;
    padding: 36px 0 0 0;
}

但我在Firefox 12中发现了一个问题。

But I have spotted a problem in Firefox 12.

无论我缩小浏览器窗口多少,HTML元素都不会低于376px。这会导致背景位置不再出现在中心,而是看起来像是右对齐(然后裁剪图像的右手部分)。

No matter how much I shrink the browser window, the HTML element never falls below 376px. This causes the background position to no longer appear in the center, but instead it looks like it is right-aligned (and then crops the right-hand portion of the image).

在Chrome,Opera和Internet Explorer中它按预期工作,但在Firefox中我得到了这种奇怪的行为。我添加了显示此页面的所有四个浏览器的屏幕截图。

In Chrome, Opera and Internet Explorer it works as expected, but in Firefox I get this strange behaviour. I have added a screenshot of all four browsers showing this page.

更新

这似乎与浏览器中工具栏的大小有关,因为它停止的宽度与浏览器工具栏的宽度相同。一位同事刚试过它,他的工具栏是427px,它停在这个值。我认为这是一个Firefox错误。

This seems to be related to the size of the toolbar in the browser as the width it stops at is identical to the width of the browser toolbar. A colleague has just tried it and his toolbar is 427px and it stopped at this value. I presume this is a Firefox bug.

推荐答案

看起来这是Firefox中的一个真正的错误,所以我提出了一个错误。

It looks like this is a genuine bug in Firefox, so I have raised a bug.

这篇关于Firefox 12 html元素不会缩小到376px以下的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆