Display:none and Visible:hidden can hide an element on a webpage, but there are differences:
Display:none---does not preserve its physical space for objects that are hidden, that is, the object disappears completely on the page and is not visible to the layman.
Visible:hidden---Make an object invisible on a Web page, but the space occupied by the object on the Web page does not change, and in layman's terms it is invisible but palpable.
Example:
<HTML><Head><title>The difference between Display:none and Visible:hidden</title></Head><Body><spanstyle= "display:none; hidden area </span><span style="Background-color:green ">Display area</span><BR/><spanstyle= "Visibility:hidden; hidden area </span><span style="Background-color:green ">Display area</span></Body></HTML>
Report:
In my project development, in order to sort the DTU online status in the DataTables table, a number was inserted in front of the "Green Circle" and "Gray Circle" (see) icon, as follows:
...//DTU Statusif(Itemdtu.dtustatus = =true) {sb.append (' <td><span style= "Display:none;" >0</span><i class= "icon-circle" style= "color:green; font-size:20px; " ></i></td> ');//Online}Else if(Itemdtu.dtustatus = =false) {sb.append (' <td><span style= "Display:none;" >1</span><i class= "icon-circle" style= "Color:gray; font-size:20px; " ></i></td> ');//Not in line}Else{sb.append (' <td><span style= "Display:none;" >1</span><i class= "icon-circle" style= "Color:gray; font-size:20px; " ></i></td> ');//No} ...
"Reprint" http://www.cnblogs.com/nicholas_f/archive/2009/03/27/1423207.html
The difference between Display:none and Visible:hidden