0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ずんだのMARQUEE問題

Last updated at Posted at 2018-10-28

ルール

  • h1 - h6 の開き・閉じタグを marquee タグに変換する
  • scrollamount に h1 - h6 の数値を設定する。 h1 なら scrollamount = 1 , h6 なら scrollamount = 6

プログラム(Ruby)

puts DATA.read.gsub(/<h(\d)/, '<marquee scrollamount="\1"').gsub(/<\/h\d/, '</marquee')

__END__
<h1>test</h1>
<h2>test</h2>
<h3>test</h3>
<div>div test1</div>
<div>div test2</div>
<div>div test3</div>

出力

<marquee scrollamount="1">test</marquee>
<marquee scrollamount="2">test</marquee>
<marquee scrollamount="3">test</marquee>
<div>div test1</div>
<div>div test2</div>
<div>div test3</div>

出力結果をブラウザで表示

zunda_marquee.gif

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?