Home  >  Article  >  Web Front-end  >  The importance of HTML document types_html/css_WEB-ITnose

The importance of HTML document types_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:51:43857browse

Because I didn’t study the front-end things carefully and systematically, I encountered a strange problem in the past two days, because to put up a bay window effect, I need to add a floating picture on the homepage of the website. I found the javascript code that achieves this effect. After opening it locally, I can see the floating effect in every browser. However, when I copied this code to my homepage, I found that it had no effect. I thought it was a path problem, so I modified it. Afterwards, I found that these problems still didn't work. Later, my classmates browsed in an old version of IE and found that they could browse with the same effect as the local one. Only then did they realize that it was the document description at the front of their own html document
The original document on our homepage The description is HTML5, but we can't browse it in Chrome and Firefox, so we tried to remove first, and then miraculously found that the floating effect was realized, because the js code we were looking for The reason for the non-standardization is that it does not meet the standards of HTML5, and as a result, the effect is not achieved, which shows the importance of code specifications.

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