Detailed source reference: http://www.jb51.net/css/15987.html
During the tab switch today, we encountered a problem. IE8, IE7, and Firefox did not parse the PX height in a uniform way. We plan to start
! Important solved the problem and later found that IE7 and IE8 all support this. It cannot be judged at all. So I found an article on the Internet.
We used most of the CSS hack for Firefox IE6 IE7 IE8! Important comes to hack, which can be displayed normally for IE6 and Firefox tests, but IE7 and above! Important can be correctly explained, and the page will not be displayed as required! After searching, I found a good hack Method for IE7 and IE8. IE7 uses * + HTML or * line-Height: 23px.
CSS hack for Firefox IE6 IE7 IE8
We used most of them in the past! Important comes to hack, which can be displayed normally for IE6 and Firefox tests, but IE7 and above! Important can be correctly explained, and the page will not be displayed as required! After searching, I found a good hack Method for IE7 and IE8. IE7 uses * + HTML or * line-Height: 23px, and IE8 uses "\ 9" to differentiate, for example: line-Height: 26px \ 9.
CSS can be defined as follows. Pay attention to the sequence:
# Menu {Line-Height: 23px;}/* implement this definition in Firefox */
# Menu {Line-Height: 26px \ 9;}/* IE6, IE7, and IE8 define the hack for IE8 */
# Menu {* line-Height: 23px;}/* IE6, IE7, which defines the hack for IE7 */
# Menu {_ line-Height: 23px;}/* This definition is preferentially implemented by IE 6 browser */or written into a sentence
# Menu {Line-Height: 23px; line-Height: 26px \ 9; * line-Height: 23px; _ line-Height: 23px;} or
* Html # menu {Line-Height: 23px;}/* implement this definition in IE 6 */
* + Html # menu {Line-Height: 23px;}/* implement this definition in IE 7 */
Detailed source reference: http://www.jb51.net/css/15987.html