Turn, marquee compatibility issues in IE6 and FF

Source: Internet
Author: User

Over the past few days, I have been tuning the mibs console interface to solve the compatibility problem between IE6 and Firefox. The manager said that it would be easier to make two styles Based on IE6 and FF respectively. However, I think adjustment and compatibility are not difficult for me, so I tried to adjust the style. The style was improved quickly and it was done in half a day. Marquee only paid some twists and turns during the adjustment. Afterwards, I think this is a good experience. I should write it out and share it with you. In the future, when you encounter this problem, you can at least avoid detours, save valuable time. Of course, you may have used this method, but writing it out will always be helpful to everyone.

Marquee is not a standard label, but extended by IE, which is incompatible with ff. I checked a lot of information online, most of which were controlled by JS, so that the compatibility of multiple browsers can be achieved. I willCodeI copied it and demonstrated that it did achieve the expected results, but the reason why I didn't use these methods was:

1. js code is quite a lot. It is really not worth calling so much code when only one text is rolled. As we all know, it is not a good thing to use too much JavaScript code.

2. It is good to demonstrate this effect independently, but when I port this effect to the existing interface, it will not scroll, and it is very likely to conflict with other code, because the existing interface has called a lot of Js.

I went to the Internet to collect relevant information and accidentally saw a foreign website, which showed the scrolling effect of the text and showed it in ff, looking at the source file is a purely used marquee and does not call any Js. This makes me very excited and at least conveys the hope: that is why Firefox is compatible with marquee!

I went back to my interface and found the cause again. I tried a variety of methods without any effect, so I compared my code with others' code, the only difference I found was that my marquee was contained in a DIV, while others were included in a table. This difference didn't attract my attention at first, however, because all possible methods do not work, try this method that is not favored by me and remove the div. The result is successful and can be displayed normally under IE6 and ff. I set up another table in marquee, and the result is displayed normally. Very happy! I tested several methods and tried to thoroughly understand the features of Marquee. I found another problem: I want to give marquee A width value so that it can be displayed normally, otherwise, the scroll effect cannot be displayed! If there are other small issues, I will not be able to test it. Interested friends can try to find them and learn a lot by themselves!

At last, I wish you all a happy and Happy Christmas! :)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.