Chrome conditional comments

前端 未结 5 1033
后悔当初
后悔当初 2020-12-04 22:12

Is there such a thing as conditional comments for Chrome?

I have a page that renders differently in Chrome when compared to Firefox.

Thanks

5条回答
  •  遥遥无期
    2020-12-04 22:47

    
    

    This isn't just a Chrome conditional comment - this hits all browser that aren't IE... firefox, safari, etc. If using PHP - try this:

    
    
    
    
    Browsser Detection
    
    
    
    
    
    
    
    ';
    }
    if ($safari) {
    echo '';
    }
    
    ?>
    
    
    
    
        
    you are not using Internet Explorer
    '; } if ($msie) { // IE? echo '
    you are using Internet Explorer
    '; } ?>

    Credit to John for posting: http://www.killersites.com/forums/topic/2731/firefox-google-chrome-browser-detecion-using-conditional-comments-hack/

提交回复
热议问题