css display

Display method

  Role: determines how to display the positioning elements on the page

  Properties: display

    display: none; classification element becomes empty, and thus not seen, from the document flow

    Control element visibility: visibility: hidden; hide

             visibility: visible; visible

                visibility: collapse; for use on table elements, delete a row or a column does not affect the overall layout of the table  

 1 <table border="1" cellpadding="0" cellspacing="0" width="300px" height="300px">
 2             <tr>
 3                 <td style="visibility: collapse;"></td>
 4                 <td></td>
 5                 <td></td>
 6             </tr>
 7             <tr>
 8                 <td style="visibility: collapse;"></td>
 9                 <td></td>
10                 <td></td>
11             </tr>
12             <tr>
13                 <td style="visibility: collapse;"></td>
14                 <td></td>
15                 <td></td>
16             </tr>
17         </table>

 

the difference:

  display   from the document flow  ; visibility   without departing from the document flow, leading to still occupy space

And display independent knowledge

Transparent

  In addition to transparent border in use, as well as opacity means transparent color

Guess you like

Origin www.cnblogs.com/zycs/p/12085338.html