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

Make comment tags universal across browsers_CSS/HTML

WBOY
WBOYOriginal
2016-05-16 12:11:441927browse

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

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