2014-12-25 2 views
1

어떻게 내 html로 자바 스크립트를 사용하여 marquee 요소를 html로 끝낼 수 있습니까?마키와 관련된 문제

하자,

<marquee behavior="alternate" direction="right">hello</marquee> 

는 내가 위에 마우스를 넣을 때 텍스트의 인사 이동을 중지합니다.

감사합니다.

+0

'<천막 onMouseover와 = "this.stop();" onmouseout = "this.start();" behavior = "alternate"direction = "right"> 안녕하세요' –

+0

''이 (가) 더 이상 사용되지 않으십니까? –

답변

3

당신은 단순히 행동 변화 인라인 추가 할 수 있습니다 : 모질라 V27에 실 거예요 작업 아래

<marquee behavior="alternate" onmouseover="this.scrollAmount = 0" 
onmouseout="this.scrollAmount=10" direction="right">hello</marquee> 

DEMO

1

코드를

<marquee behavior="alternate" onmouseover="this.scrollAmount = 0" 
onmouseout="this.scrollAmount=10" direction="right">hello</marquee> 

이 문제에 대한 해결 방법은 다음 코드

를 사용하는 것입니다
<marquee onMouseOver="this.setAttribute('scrollamount', 0, 0);" OnMouseOut="this.setAttribute('scrollamount', 6, 0);">Hello</marquee> 

바이올린 : 나는 또한 읽어 보시기 바랍니다 http://jsfiddle.net/3kedfyos/3/

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/marquee

+0

크롬에서 작동하지 않습니다. –

+0

이러한 이유 때문에 저는 mozilla의 링크를 첨부했습니다. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/marquee – Learning

2

데모 - http://jsfiddle.net/h4ww3jsv/

<marquee onmouseover="this.stop();" onmouseout="this.start();" behavior="alternate" direction="right">hello</marquee>