<marquee> problem in ie8

て烟熏妆下的殇ゞ 提交于 2019-11-30 01:40:20

问题


My <marquee> tag is working perfectly in ie6 and ie7, but in ie8 it only shows first item.

How can I fix this?

Thanks in advance.


回答1:


The marquee element is deprecated. The W3C recommends using <em> and <strong> as alternatives. If you need to mimic the behavior of the marquee, JavaScript has tools for doing that. This discussion has a working JavaScript example.




回答2:


As much as it pains me to link this: http://remysharp.com/demo/marquee.html

A jquery based marquee which will work across browsers.




回答3:


As much as I loathe the element and the vast majority of its use-cases, CSS3 seems to have brought it back:

  • CSS Play: CSS 3 Marquee.
  • CSS3.info: CSS3 Marquee Module.



回答4:


From what I understand Marquee is deprecated, and IE8 might be the version of IE that Microsoft decided to completely leave out support for that tag. Even if you do find a way to get it to work, I would suggest using another method to get the text to scroll (if that is what is needed) becuase you will probably have the same problem in the next version if IE.

EDIT: You can try java script...after a quick search I found this site that looks like it will generate the code for you. Also, since it's javascript it should now also work on Firefox, Chrome, etc. http://rumkin.com/tools/marquee/




回答5:


I really feel the scroller mechanism is pre-Web 2.0. If your client wants it, well you may not have a lot of options but I would really try and do some kind of demo to highlight that there are better ways and it would not cause any instability to the site if implemented correctly.

I know many clients are cautious, but in my experience if you can show them a better alternative which is as stable or even more stable and at a low cost (time and money) then they are willing to accept the new way more often than not.



来源:https://stackoverflow.com/questions/2297888/marquee-problem-in-ie8

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!