This question already has answers here:
CSS \9 in width property
                                
                                    (4个答案)
                                
                        
                                6年前关闭。
            
                    
嗨,我遇到过以下代码:.height480{ min-height:484px; min-height:497px\9;}我以前从未见过反斜杠。我已经检查了W3c文档中的最小高度,没有提及它。有人知道吗?我注意到firefox忽略了它,所以猜测它可能只是拼写错误?干杯

最佳答案

它是IE骇客

前一个min-height适用于其他浏览器,下一个min-height with slash适用于IE7,IE8和IE9

see this site

.header {width:300px;height:200px;background:#000;} /* Applies to all browsers */
*.header {width:310px;height:200px;background:#000;} /* Applies to all IE browsers */
_.header {width:290px;height:200px;background:#000;} /* Applies to all IE browsers 6 and below */
.header {width /*\**/:330px\9;height:200px;background:#000;} /* Applies to IE 8 */
(Note: IE 8 and IE9 are a diffent animals, it is tying to act like web-kit. A tip of the hat to Safari and Crome.)

09-25 18:31
查看更多