html
HTML - 움직이는 태그
<marquee> 태그를 이용하면 글자나 이미지를 상하좌우 방향으로 자동으로 움직이게 할 수 있습니다.
behavior 속성이 scroll 일 때 결과입니다.
behavior 속성이 aliernate 일 때 결과입니다.
다음은 이미지를 이용한 결과입니다.
속 성 | 설 명 |
---|---|
direction | 대상을 어느 방향으로 흐르게 할 것인지를 결정
|
bgcolor | 배경색 |
behavior | 대상을 어떤 방법으로 움직이게 할 것인지를 결정
|
width | 박스의 너비 |
height | 박스의 높이 |
scrollamount | 대상이 움직일 때 한 번에 얼마만큼의 거리로 움직일 것인가를 결정 수치를 입력하며 수치가 커질수록 거리가 커짐 |
scrolldelay | 대상의 움직이는 속도를 설정. 수치를 입력하며 수치가 커질수록 속도가 느려짐 |
loop | 반복횟수. 기본값 infinite |
behavior 속성이 scroll 일 때 결과입니다.
<marquee direction="up" bgcolor="yellow" behavior="scroll"
width="100" height="100" scrolldelay="5">
하보니 PHP
</marquee>
behavior 속성이 aliernate 일 때 결과입니다.
<marquee direction="up" bgcolor="yellow" behavior="alternate"
width="100" height="100" scrolldelay="5">
하보니 PHP
</marquee>
다음은 이미지를 이용한 결과입니다.
<marquee direction="left" bgcolor="yellow" behavior="scroll"
width="100" height="100" scrolldelay="5">
<img src='aran.jpg' width='100' height='100'>
<img src='honda.jpg' width='100' height='100'>
</marquee>
0 댓글