Marquee in HTML

别等时光非礼了梦想. 提交于 2019-12-11 19:11:05

问题


how would I go about making a marquee in html? could I define everything i.e. speed, looping, text color, background color, direction, etc. With just html or should I need to know another language to define those aspects? Also could I implement an image in the marquee?


回答1:


You don't want to use that tag. Really. It is evil.

For alternatives, check out:

  • The Silky Smooth Marquee
  • jScroller2
  • Cross Browser Marquee



回答2:


@Paolo is correct, you also might wanna look into tools to do similar things but have much more functionality. jScroller for example.




回答3:


You can do images in the marquee tag:

http://jdstiles.com/java/scrollers/scrollingimage.html

But it's not a good tag to use. Go for one of the many javascript libraries that do this, such as this Cross Browser Marquee that allows you to set all the parameters you like.

-Adam




回答4:


Something like this:

<MARQUEE id=Marquee2 title="" 
style="BORDER-RIGHT: 1px; BORDER-TOP: 1px; PADDING-LEFT: 3px; Z-INDEX: 2; OVERFLOW: hidden; BORDER-LEFT: 1px; WIDTH: 5.197in; TEXT-INDENT: 0px; BORDER-BOTTOM: 1px; HEIGHT: 0.156in" 
trueSpeed scrollDelay=150 MsoTextAlign="General">My Text Goes Here</MARQUEE>



回答5:


You can change the speed, direction and looping in the html but to edit background color you will need to use CSS. To style the text color, you do not need to style the <marquee> but you need to style the elements INSIDE the tag.




回答6:


I recently implemented a marquee in HTML using Cycle 2 Jquery plugin : http://jquery.malsup.com/cycle2/demo/non-image.php

<div class="cycle-slideshow"  data-cycle-fx="scrollHorz" data-cycle-speed="9000" data-cycle-timeout="1"  data-cycle-easing="linear" data-cycle-pause-on-hover="true" data-cycle-slides="> div" >
  <div>  Text 1  </div>
  <div>  Text 2  </div>
</div>    


来源:https://stackoverflow.com/questions/687523/marquee-in-html

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