Home >Web Front-end >CSS Tutorial >div css layout must know css conditional comment theory and practice page 1/2_Experience exchange

div css layout must know css conditional comment theory and practice page 1/2_Experience exchange

PHP中文网
PHP中文网Original
2016-05-16 12:07:441670browse

Browser conditional comment theory, use the following example to explain this problem
(X)HTML
The following code is to test the effect of conditional comment statements under Microsoft's IE browser

Copy code The code is as follows:








The following code is run under non-IE browsers Conditional comments

Copy code The code is as follows:



You are not using Internet Explorer


p>


Finally works in non-IE and special IE browsers
(or use lte lt or gt gte to judge, such as :


).


You are using Internet Explorer version 6 h1>





From: http://www.cssplay.co.uk/menu/conditional.html
Preview model
The conditional annotation mentioned above is to determine the browser type and then define what browser What is shown below.
This dropmenu (drop-down menu) model comes from cssplay and was made after many studies and repeated tests by the author. I want to use this model to practice the principle of conditional annotation.
Let’s look at the simplest model first


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn