关于:浮动元件是否需要固定宽度才能工作? [英] Regarding: does a floated element require a fixed width to work?

查看:72
本文介绍了关于:浮动元件是否需要固定宽度才能工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

>>浮动元素是否需要固定的宽度才能工作?

>>does a floated element require a fixed width to work?

如果UA遵守CSS 2.0规则,而不是遵守CSS
2.1float规则(或者如果它是IE)。
It does if the UA adheres to CSS 2.0 rules, not if it adheres to CSS 2.1float rules (or if it''s IE).




那么这是指nn6,moz1.0,moz1.4,Firefox,Opera(版本4到

6),Safari 1.2和IE都搞砸了CSS 2 Float规则

错了?第一个正确的是Opera 7.5?


或者是它在CSS 2.1中被改变的原因因为这么多

浏览器弄错了?


真诚,

大师



So does that mean nn6, moz1.0, moz1.4, Firefox, Opera (versions 4 to
6), and Safari 1.2 and IE have all implimented CSS 2 Float rules
wrong? and the first one to get it right is Opera 7.5?

Or is that the reason it was changed in CSS 2.1 because so many
browsers got it wrong?

sincerely,
The Master

推荐答案

大师写道:
The Master wrote:
浮动元素是否需要固定宽度才能工作?
如果UA遵守CSS 2.0规则,如果它遵守CSS 2.1浮动规则(或者如果它是IE)。
does a floated element require a fixed width to work?
It does if the UA adheres to CSS 2.0 rules, not if it adheres to
CSS 2.1 float rules (or if it''s IE).



那么这意味着nn6,moz1.0,moz1 .4,Firefox,Opera(版本4
到6),以及Safari 1.2和IE都搞砸了CSS 2 Float规则错误吗?第一个正确的是Opera 7.5?



So does that mean nn6, moz1.0, moz1.4, Firefox, Opera (versions 4
to 6), and Safari 1.2 and IE have all implimented CSS 2 Float rules
wrong? and the first one to get it right is Opera 7.5?




第一个正确的是IE 5.x / Mac。该浏览器是标准一致性AIUI的第一次尝试。我很惊讶听到

O7.5这样做;这不是O7.2的行为。

或者是因为它在CSS 2.1中被改变的原因是因为很多浏览器错了?



The first one to get it right was IE 5.x/Mac. That browser was the
first attempt at standards conformance AIUI. I''m suprised to hear that
O7.5 does this; it was not the behavior of O7.2.
Or is that the reason it was changed in CSS 2.1 because so many
browsers got it wrong?




后者。 IE 5.x / Mac遵循规则,并没有收缩浮动元素的宽度

。大多数其他浏览器分配了一个

浮动元素的宽度,其大小足以容纳内容。 CSS 2.1

只允许这种行为。


-

Brian(删除.invalid给我发电子邮件)
http://www.tsmchughs.com/


2004年7月26日14:46:19 -0700, tg **** @ goldhil.com (大师)写道:
On 26 Jul 2004 14:46:19 -0700, tg****@goldhil.com (The Master) wrote:
浮动元素是否需要固定宽度才能工作?如果UA遵守CSS 2.0规则,而不是坚持CSS
does a floated element require a fixed width to work?It does if the UA adheres to CSS 2.0 rules, not if it adheres to CSS


2.1


2.1

浮动规则(或者如果它是IE)。
float rules (or if it''s IE).



那么这意味着nn6,moz1.0,moz1.4,Firefox,Opera(版本4到
6),而Safari 1.2和IE都搞砸了CSS 2 Float规则
错误?第一个正确的是Opera 7.5?



So does that mean nn6, moz1.0, moz1.4, Firefox, Opera (versions 4 to
6), and Safari 1.2 and IE have all implimented CSS 2 Float rules
wrong? and the first one to get it right is Opera 7.5?




ISTR即IE5 for Mac(这是一个完全不同的浏览器

比IE5 on Win,BTW)也需要浮动的宽度。

或者是因为它在CSS 2.1中被更改的原因是因为很多浏览器错了?

毫无疑问,如果只有一个*特定的*浏览器

(或操作系统组件,正如Alan所说)得到它
错了。


尼克


真诚,
大师



ISTR that IE5 for the Mac (which is a completely different browser
than IE5 on Win, BTW) also requires widths for floats.
Or is that the reason it was changed in CSS 2.1 because so many
browsers got it wrong?

It would have been enough, no doubt, if just one *particular* browser
(or, "operating system system component" as Alan likes to say) gets it
wrong.

Nick

sincerely,
The Master




-

Nick Theodorakis
ni**************@hotmail.com

联系表格:
http://theodorakis.net/contact.html


tg **** @ goldhil.com (The Master)写道:


请在回复时使用跟进机制,不要开始新的

线程。
tg****@goldhil.com (The Master) wrote:

Kindly use the follow up mechanism when replying, don''t start a new
thread.
浮动元素是否需要固定的宽度才能工作?如果UA遵守CSS 2.0规则,而不是遵守CSS
2.1浮动规则(或者如果它是IE)。
does a floated element require a fixed width to work?It does if the UA adheres to CSS 2.0 rules, not if it adheres to CSS
2.1 float rules (or if it''s IE).



那么这意味着nn6,moz1.0,moz1.4,Firefox,Opera(版本4到
6)和Safari 1.2和IE都搞砸了CSS 2 Float规则错了吗?第一个正确的是Opera 7.5?



So does that mean nn6, moz1.0, moz1.4, Firefox, Opera (versions 4 to
6), and Safari 1.2 and IE have all implimented CSS 2 Float rules
wrong? and the first one to get it right is Opera 7.5?




所有UAs都有浮动错误(CSS浮动的结果非常复杂

规则)。

或者是因为它在CSS 2.1中被更改的原因是因为很多浏览器出错了?



All UAs have float bugs (the result of ridiculously complex CSS float
rules).
Or is that the reason it was changed in CSS 2.1 because so many
browsers got it wrong?




那里这两种方法都有优点:


1)需要指定的固定宽度(CSS 2.0):在下载任何依赖项之前,UAs可以布局页面

。 br />
2)使用缩小以适合方法(CSS 2.1):允许浮动

预定大小的内容。


在实践中,(2)的优点胜过(1)的缺点imo。


底线:尽可能指定花车的宽度。


-

Spartanicus



There are advantages to both methods:

1) Require a specified fixed width (CSS 2.0): UAs can layout a page
before any dependencies have downloaded.
2) Use a "shrink to fit" method (CSS 2.1): allows floating of content of
pre undetermined size.

In practice the advantage of (2) outweighs the disadvantage of (1) imo.

Bottom line: specify a width for floats when you can.

--
Spartanicus


这篇关于关于:浮动元件是否需要固定宽度才能工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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