The visibility CSS

In CSS visibility property, most of the time the value is set to visible, or hidden.
Where hidden like display: none, but still hidden temporary data element space.

There is also a visibility value is the collapse. When visibility attribute element is set to a collapse value for the element in general, its performance is the same as with the hidden. The exception is that if this element is table-related elements, such as table rows, table group, table columns, table column group, but its performance with display: as none, that is, they take up space will be freed.
This property will be in different browsers different interpretations, the Google browser, using the collapse value and use of hidden value there is no difference, in Firefox, Opera and IE11, the use of collapse value effect as if it's literally: table rows will disappear, it's the bottom line will complement its location.
In summary:
Under normal circumstances, the use of visibility: collapse; and use visibility: hidden value is no different.
And is used in a non Google on the table tr collapse, the same effect display: none;
use ie at low visibility version (e.g. 7): collapse; no effect.

Specific presentations can be found here: http://www.webhek.com/post/visibility-collapse.html

<ul id="8">
        <li><a href="">员工列表</a></li>
        <li><a href="">部门管理</a></li>
        <li><a href="" style="display:none">添加员工</a></li>
        <li><a href="" style="display:none">wait</a></li>
    </ul>

There are such code, in fact, discard the contents of the location of a label, natural li tag is still reserved, so be careful when writing point on the line

发布了53 篇原创文章 · 获赞 33 · 访问量 11万+

Guess you like

Origin blog.csdn.net/weixin_42966484/article/details/103717667