显示:正常吗? [英] display:normal?

查看:59
本文介绍了显示:正常吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




通过

DOM访问设置其显示属性来打开和关闭元素时,display:none对所有类型的元素都有效,但是我不能再发现任何关于再次切换的通用值的信息。


此外,UA不识别相同的值。为了使一个表格行显示

可见,IE想要显示:阻止,而FF想要显示:table-row。


我错过了什么?我正在寻找像display:normal

或者display:ua-default或者其他任何东西,如果没有设置显示属性,那么获取元素呈现的方式是什么

UA渲染它。


我真的很惊讶我找不到任何关于这个问题的东西,无论如何

谷歌搜索它并不像显示那么容易和正常的非常好

常用词。


感谢您对此问题的评论!

Markus

解决方案

Markus Ernst< derernst@NO#SP#AMgmx.ch>写在

新闻:43 ********** @ news.cybercity.ch:

我错过了什么?我正在寻找类似
display:normal或display:ua-default或者其他什么东西,如果没有设置显示属性,它会获得如何呈现UA的
元素。

我真的很惊讶我没有发现任何关于这个问题的信息,
无论如何谷歌搜索它并不像显示那么容易。和正常的是非常常见的单词。




您可能正在寻找可见性:隐藏,可见性:可见。值得一试

试试?


-

Stan McCann,Uncle Pirate http://stanmccann.us/

网站站长,Alamogordo的NMSU http://alamo.nmsu.edu/

现在阻止Google Grouper帖子和回复。
http://blinkynet.net/comp /uip5.html


Stan McCann schrieb:

我错过了什么?我正在寻找类似
display:normal或display:ua-default或者其他什么东西,如果没有设置显示属性,它会获得如何呈现UA的
元素。

我真的很惊讶我没有发现任何关于这个问题的信息,
无论如何谷歌搜索它并不像显示那么容易。和正常的是非常常见的单词。



您可能正在寻找可见性:隐藏,可见性:可见。值得一试
尝试?




不,因为可见性属性不会从

元素流中删除元素,而只是隐藏它,留下一个空格作为占位符。

这对具有绝对定位的元素起作用,但对表格行,表单字段或表格字段等元素不起作用文本段落。


实际上我认为应该有一个正常的段落。每个

属性的价值都是可以改变的。


无论如何,如果您的观点是,可见性属性是为了$ / b $ b切换打开和关闭而不是显示属性,这听起来对我来说是合理的。在这种观点下,我应该说明,可见性的概念并不完整,即崩溃。价值

实际上应该适用于所有类型的元素,而不仅仅适用于表格

元素。 (如果有任何浏览器支持

可见性:崩溃,但是......)


也许我应该向 ww ******* @ w3.org

感谢您的投入。


Markus


Markus Ernst< derernst@NO#SP#AMgmx.ch>写道:

当通过DOM访问设置其显示属性来打开和关闭元素时,显示:none对所有类型的元素都有效,但我可以'' t
找到关于再次切换的通用值的任何信息。


没有这样的值,也不需要。

此外,UAs不识别相同的值。为了使表格行可见,IE想要显示:阻止,而FF想要显示:table-row。




IE不支持CSS 2表模型,加上它在某些情况下无法忽略

不支持的CSS值。


你可以使用另一个IE漏洞来解决这些

问题的综合影响:


tr {display:none}

tr {display :table-row!important; display:block}


这适用于IE和适当的浏览器。在JS小组中询问如何使用DOM学习




-

Spartanicus


Hi

When toggling an element on and off by setting its display property via
DOM access, display:none is valid for all kinds of elements, but I can''t
find anything about a generic value for toggling on again.

Furthermore, UAs do not recognize the same values. To make a table row
visible, IE wants display:block while FF wants display:table-row.

Am I missing something? I am looking for something like display:normal
or display:ua-default or whatever, that gets the element rendered how
the UA renders it if no display property is set.

I am actually surprised I don''t find anything about this problem, anyway
googling for it is not as easy, as "display" and "normal" are very
common words.

Thanks for comments on this issue!
Markus

解决方案

Markus Ernst <derernst@NO#SP#AMgmx.ch> wrote in
news:43**********@news.cybercity.ch:

Am I missing something? I am looking for something like
display:normal or display:ua-default or whatever, that gets the
element rendered how the UA renders it if no display property is
set.

I am actually surprised I don''t find anything about this problem,
anyway googling for it is not as easy, as "display" and "normal" are
very common words.



You may be looking for visibility:hidden, visibility:visible. Worth a
try?

--
Stan McCann, "Uncle Pirate" http://stanmccann.us/
Webmaster, NMSU at Alamogordo http://alamo.nmsu.edu/
Now blocking Google Grouper posts and replies.
http://blinkynet.net/comp/uip5.html


Stan McCann schrieb:

Am I missing something? I am looking for something like
display:normal or display:ua-default or whatever, that gets the
element rendered how the UA renders it if no display property is
set.

I am actually surprised I don''t find anything about this problem,
anyway googling for it is not as easy, as "display" and "normal" are
very common words.


You may be looking for visibility:hidden, visibility:visible. Worth a
try?



No, as the visibility property does not remove the element from the
element flow, but just hides it, leaving a blank space as a placeholder.
This does the trick for elements with absolute positioning, but not for
elements such as table rows, form fields, or text paragraphs.

Actually I think that there should be a "normal" value for every
property that is changeable at all.

Anyway if your point is, that the visibility property is meant for
toggling on and off rather than the display property, this sounds
reasonable to me. Under this point of view I should rather state that
the concept of visibility is not complete, that the "collapse" value
should actually apply for all kinds of elements, and not for table
elements only. (If there was any browser support for
visibility:collapse, though...)

Maybe I should post a feature request to ww*******@w3.org?
Thanks for your input.

Markus


Markus Ernst <derernst@NO#SP#AMgmx.ch> wrote:

When toggling an element on and off by setting its display property via
DOM access, display:none is valid for all kinds of elements, but I can''t
find anything about a generic value for toggling on again.
There is no such value, nor is one needed.
Furthermore, UAs do not recognize the same values. To make a table row
visible, IE wants display:block while FF wants display:table-row.



IE doesn''t support the CSS 2 table model, plus it fails to ignore
unsupported CSS values in some situations.

You can "use" another IE bug to get around the combined effect of these
issues:

tr{display:none}
tr{display:table-row !important;display:block}

This works both in IE and proper browsers. Ask in a JS group to learn
how to do this using the DOM.

--
Spartanicus


这篇关于显示:正常吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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