Home >Web Front-end >JS Tutorial >IE6/7 and IE8/9/10 (IE7 mode) hide the parent element and child element with absolute or relative in sequence and then display the parent element_javascript technique
As shown below
1, two divs, d1 contains d2
2, d1 and d2 are set to absolute or relative
3, hide d1
4, hide the child element d2
5, display d1
At this time, in IE6/7 and IE8/9/10 (IE7 mode), you will find that the sub-element d2 can also be displayed (don’t forget, d2 is displayed:none). But the neutron element d2 is still hidden in IE8/9/10/Firefox5/Safari4/Chrome12.
Reproduce code