Home > Web Front-end > CSS Tutorial > Make comment tags universal across browsers_CSS/HTML

Make comment tags universal across browsers_CSS/HTML

WBOY
Release: 2016-05-16 12:11:44
Original
1984 people have browsed it

Under IE, the code located under this tag will not be displayed on the page, which is very useful for hiding some HTML code.
However, this tag is invalid under non-IE browsers; you can test the following code under IE and FF respectively to know the effect.

Copy code The code is as follows:
Test: Hidden content < ;/comment>


Solution:
Define comment {display:none;} in CSS to make it universal across browsers.
Copy code The code is as follows:

Test: Hide content

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template