タグ(文字を動かすマーキー)応用編


「文字を右から左へスクロールします」

「文字を左から右へスクロールします」HTMLタグは<marquee direction="right">「文字を左から右へスクロールします」</marquee>
「文字を左から右へスクロールします」

左右を往復してみましょう HTMLタグは<marquee behavior="alternate"> 左右を往復</marquee>
左右を往復

右からでて左で停止する HTMLタグは<marquee behavior="slide">右からでて左で停止</marquee>
右からでて左で停止

左からでて右で停止する HTMLタグは<marquee behavior="slide" direction="right">左からでて右で停止</marquee>
左からでて右で停止

高さ100pxで上へスクロールする HTMLタグは<marquee height="100" direction="up"> 上へスクロール</marquee>

上へスクロール

高さ50pxで下へスクロールする HTMLタグは<marquee height="50" direction="down">下へスクロール</marquee>

下へスクロール

画像も同じようにスクロールできます。HTMLタグは同じように<marquee><img src="  ></marquee> です。画像のアドレスは、使う画像をいれてくださいね。(^_^)v

色に関する属性をつけてみましょう
背景色はbgcolor="色名"か、"カラーコード"で指定します。デフォルト(属性を指定しない場合)は背景色はつきません

幅300px、背景色yellowで左右を往復する HTMLタグは<marquee width="300" behavior="alternate" bgcolor="yellow">左右を往復</marquee>

左右を往復

幅70%、背景色fuchsia、文字色yellowで右へスクロールする HTMLタグは<marquee width="70%" direction="right" bgcolor="fuchsia"><font color="yellow">右へスクロール</font></marquee>

右へスクロール

高さ100px、背景色yellow、速度10で上へスクロールする HTMLタグは<marquee height="100" direction="up" scrollamount="10" bgcolor="yellow">上へスクロール</marquee>

上へスクロール

高さ100px、時間200、背景色yellow、速度3で上下を往復する HTMLタグは<marquee height="100" behavior="alternate" direction="up" scrollamount="3" bgcolor="yellow">上下を往復</marquee>

上下を往復

幅600px、高さ150px、背景色whiteで左下に落ちながら進む HTMLタグは<marquee width="600" height="150" direction="down" bgcolor="white"><marquee direction="left">左下に落ちながら進む</marquee></marquee>

左下に落ちながら進む

幅600px、高さ150px、背景色oliveで右上に上がりながら進む HTMLタグは<marquee width="600" height="150" direction="up" bgcolor="olive"><marquee direction="right">右上に上がりながら進む</marquee></marquee>

右上に上がりながら進む

?や画像を上下左右に動かしてみましょう
わかりやすいように背景色「 pink 」をつけました。HTMLタグは<marquee behavior="alternate" direction="up" height="250"><marquee behavior="alternate" width="600" height="73" bgcolor="pink">???または画像></marquee></marquee>
画像のアドレスは、使う画像を入れてください。

???または画像>

9個の★を色・大きさ・速度を変えてスクロールしてみましょう

1・右から左へ落ちながら進む HTMLタグ
<marquee direction="down" width="600" height="200" bgcolor="pink">
<marquee scrollamount="5"><font color="navy" size="2">★</font></marquee>
<marquee scrollamount="10"><font color="black" size="1">★</font></marquee>
<marquee scrollamount="15"><font color="blue" size="3">★</font></marquee>
<marquee scrollamount="5"><font color="gray" size="5">★</font></marquee>
<marquee scrollamount="10"><font color="aqua" size="6">★</font></marquee>
<marquee scrollamount="20"><font color="green" size="4">★</font></marquee>
<marquee scrollamount="5"><font color="silver" size="6">★</font></marquee>
<marquee scrollamount="10"><font color="lime" size="5">★</font></marquee>
<marquee scrollamount="15"><font color="maroon" size="7">★</font></marquee></marquee>












2・右から左へ上がりながら進む HTMLタグは、1の1行目のdownをupに変えて下さい












3・右から左へ落ちながら進み6個は左端から折り返して左から右へ落ちながら進む HTMLタグ
<marquee direction="down" width="600" height="200" bgcolor="white">
<marquee behavior="alternate" scrollamount="5"><font color="silver" size="6">★</font></marquee>
<marquee behavior="alternate" scrollamount="10"><font color="lime" size="5">★</font></marquee>
<marquee behavior="alternate" scrollamount="15"><font color="maroon" size="7">★</font></marquee>
<marquee scrollamount="5"><font color="yellow" size="6">★</font></marquee>
<marquee scrollamount="10"><font color="olive" size="7">★</font></marquee>
<marquee scrollamount="15"><font color="red" size="5">★</font></marquee>
<marquee behavior="alternate" scrollamount="5"><font color="teal" size="7">★</font></marquee>
<marquee behavior="alternate" scrollamount="10"><font color="fuchsia" size="6">★</font></marquee>
<marquee behavior="alternate" scrollamount="15"><font color="purple" size="5">★</font></marquee></marquee>












★を文字や画像に変えるといろいろできます
自動改行の場合は、HTMLタグ中に空白のないようにしてください。

© Rakuten Group, Inc.
Design a Mobile Site
スマートフォン版を閲覧 | PC版を閲覧
Share by: