In the forum, I saw netizen jeanjean20 mentioning how to modify Marquee to meet the standards. I read my friends' comments and thought they were all very good. Moderator greennn pointed out that Marquee was not in compliance with the standards and had been abandoned by W3C. Some friends complained that they thought it was unreasonable to go there. The effect was already very good now. Some friends also said that they would be upset when they went there. Everyone has their own understanding angles, but how we understand it ourselves is the same thing, but we need to figure out why. Here I will modify and add some content after the conclusion of greennn, hoping that everyone can understand and figure it out.
The first thing to be corrected is: Marquee was abandoned by W3C. This sentence is actually wrong. Why? Because Marquee has never been regarded as a formal label by W3C. W3C has never formulated this label, let alone abandon it. It's like saying divorce before getting married. In fact, like many other tags, Marquee is privately manufactured by companies such as Microsoft and Netscape, and W3C has never recognized this tag. This rich company has the problem of being unreasonable, but this unprofitable organization is just stubborn!
Why has W3C been refusing to recognize Marquee? If you want to say that this label is a screwdriver in the eyes of the majority of web designers! In the early years, we still regarded technological power as the capital to show off. But now I don’t advocate using it (I’m going to talk about it here: Many people say that W3C is not allowed to be used anymore, which is wrong. W3C has no right to restrict you from using it or not.). Why then we need to clarify what this standard is. Standards are not a technology, standards are just specifications and proposals. We still use the tags in the original HTML4.0. The standard did not add any tags to our XHTML, but gave which ones were recommended (example: p, div, ul, dl, span, em...), and which ones were not used (example: font, b, u, i...), and advocated semantics and usage specifications. Of course, the standard is not only XHTML, but also CSS, DOM and scripting languages. Many people think that CSS is produced after standard, but in fact it is not. CSS has been available very early, and the same is true for CSS. It advocates not using some CSS formulated by some browser manufacturers, such as CSS filters.
Another important point in the standard is functional separation. It is divided into three parts: structure, style, and behavior. These three parts include structure (xHTML, XML), sample work (CSS), and behavior (DOM, ECMAScript). Let's come back and think about why that Marquee was not recognized by W3C. I think everyone should understand. Like FONT, B and other labels, he is no longer a structural label. They have style and behavioral characteristics, and then they are classified into the category of structure, it is obvious that it is unnecessary.
Therefore, if you hope that the effect of Marquee can be retained or implemented, you need to pay more attention to JavaScript. The scripting language will definitely make your web page move. If you want the place you specify to move, of course, you must pay attention to the ID and CLASS in the tag.
In order to facilitate everyone to use this interesting effect, I specially asked Ao Ao to write a paragraph of JS and read the following code:
JS code:
Copy the code