是否有相反的显示:无? [英] Is there an opposite to display:none?

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

问题描述

visibility:hidden 的对立面是 visibility:visible 。同样, display:none ?

The opposite of visibility: hidden is visibility: visible. Similarly, is there any opposite for display: none?

有很多人会混淆当它具有 display:none 时,因为它不如使用 visibility 属性清楚。

Many people become confused figuring out how to show an element when it has display: none, since it's not as clear as using the visibility property.

我可以使用 visibility:hidden 而不是 display:none

推荐答案

完全相反,

A true opposite to display: none there is not (yet).

但是 display:unset

MDN (Mozilla开发人员网络):

From MDN (Mozilla Developer Network):


unset CSS关键字是initial和inherit关键字的组合。像这两个CSS宽关键字,它可以应用于任何CSS属性,包括CSS的速记全部。如果属性从父级继承,则此属性将其重置为其继承值,如果不继承,则将属性重置为其初始值。换句话说,它的行为像第一种情况下的inherit关键字,和第二种情况下的初始关键字。

The unset CSS keyword is the combination of the initial and inherit keywords. Like these two other CSS-wide keywords, it can be applied to any CSS property, including the CSS shorthand all. This keyword resets the property to its inherited value if it inherits from its parent or to its initial value if not. In other words, it behaves like the inherit keyword in the first case and like the initial keyword in the second case.

(来源: https:// developer .mozilla.org / docs / Web / CSS / unset

$ c> display:revert 目前正在开发中。有关详情,请参见 MDN

Note also that display: revert is currently being developed. See MDN for details.

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

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