html文字置顶标签,HTML的<marquee>标签怎么用?

在HTML中,标签用于在网页中创建滚动文本或图像;可以从水平向左或向右或向右或向左滚动,也可以从上到下或从下到上滚动。

417c69ab1e4cace0f402630fc8bbe128.png

marquee元素是成对出现的,下面是标签的一些属性列表:

3921c94a0cde1a10c59e3a5d7e9fbeb3.png

示例1:

Marquee标签

.main {

text-align:center;

}

.marq {

padding-top:30px;

padding-bottom:30px;

}

.hello {

font-size:36px;

font-weight:bold;

color:white;

padding-bottom:10px;

}

Hello World!

效果图:

9d058e7babaddc1f42c45ca5473f783b.gif

示例2:

Marquee标签

.main {

text-align:center;

}

.marq {

padding-top:30px;

padding-bottom:30px;

}

.hello {

font-size:36px;

font-weight:bold;

color:white;

padding-bottom:10px;

}

Hello World!

效果图:

30058f4864387333a5f898604572b904.gif

示例3:

Marquee标签

.main {

text-align:center;

}

.marq {

height: 100px;

padding:20px;

}

.hello {

font-size:36px;

font-weight:bold;

color:white;

}

Hello World!

效果图:

740bc8131efc8b3fd9dad1c8dabb677a.gif

以上就是HTML的标签怎么用?的详细内容,更多请关注html中文网其它相关文章!

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
你可以使用HTML的`<input>`标签来实现用户输入功能,例如: ``` <div class="danmu"> <marquee behavior="scroll" direction="left" scrollamount="30"><font color="red" size="15px" >树枝666</font></marquee> <marquee behavior="scroll" direction="left" scrollamount="20"><font color="aqua" size="20px">你干嘛~哎呦</font></marquee> <marquee behavior="scroll" direction="left" scrollamount="25"><font>油饼食不食</font></marquee> <marquee behavior="scroll" direction="left" scrollamount="20"><font color="pink" size="10px">贞德士泥鸭</font></marquee> <marquee behavior="scroll" direction="left" scrollamount="28"><font color="red">amagi</font></marquee> <marquee behavior="scroll" direction="left" scrollamount="20"><font color="greenyellow" size="20px">蒸虾头</font></marquee> <marquee behavior="scroll" direction="left" scrollamount="10"><font size="16px" >荔枝,你要我拿什么荔枝</font></marquee> <marquee behavior="scroll" direction="left" scrollamount="15"><font color="pink" size="20px">激尼钛霉</font></marquee> <input type="text" placeholder="请输入弹幕内容" onkeydown="if(event.keyCode==13){sendDanmu();}"> </div> ``` 这里使用了`<input>`标签,并设置了`type="text"`,表示输入框是一个文本输入框。同时,还设置了`placeholder`属性来提示用户输入内容。在输入框中按下回车键时,调用了一个JavaScript函数`sendDanmu()`,这个函数需要你自己编写,用来将用户输入的内容添加到弹幕中。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值