0
我正在處理一個主題,並且我發現有條件的註釋可以根據Internet Explorer的版本向html標記中添加類。如何理解IE的註釋條件?
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
前三個很簡單。我無法理解第四個。
它究竟做了什麼? 它如何在非IE瀏覽器上工作?
http://css-tricks.com/how-to-create-an-ie-only-stylesheet/ – RichieAHB 2014-10-01 13:19:33
@RichieAHB感謝您的鏈接。但它沒有解釋'[if gt IE 8]>'和'<![endif]'之間的註釋是做什麼的。你能幫我解決這個問題嗎? – 2014-10-01 18:32:55