左右移动转换文字特效HTML代码解析


跑马灯效果就是经常看到的文字左右移动转换效果,这是笼统说法,虽然这种效果目前已经被许多很酷的JS代替,但在有些时候有可能会用到,这里讲解的就是最常见的跑马灯效果文字公告栏置

<div align="center">
<table style="color:white; font-size:10pt" border="1" style="color:white; font-size:10pt" bordercolor="#FF9900">
<td background="图档网址.gif">
<p>
<font color="#FFFF00" face="新细明体" size="2">
<marquee scrollamount='2' scrolldelay='150' direction= 'up' width='105' id=xiaoqing height='120' onmouseover=xiaoqing.stop()
onmouseout=xiaoqing.start() style="color: #0000FF; font-size: 10pt; font-weight: bold; font-family:新细明体">文字跑马灯公告栏<br>在这输入文字内容<br></marquee>
</font></td></table>

div align="center">→文字公告栏置中
center=居中;left=靠左;right=靠右

<table style="color:white; font-size:10pt" border="1" style="color:white; font-size:10pt"

color:white →公告栏背景白色

bordercolor="#FF9900">→框线颜色(橘色)


<td background="图档网址.gif">→可有可无

<p>
<font color="#FFFF00" →公告栏内容文字颜色(蓝色)

face="新细明体" size="2">→文字字体大小

<marquee scrollamount='2' scrolldelay='150' →跑马灯速度数值越大跑越慢

direction= 'up' →文字跑马灯向上

跑马灯移动:

往左=left
往右=right
往上=up
往下=down
左右=alternate

width='105' id=xiaoqing height='120' →跑马灯公告栏宽高

onmouseover=xiaoqing.stop()
onmouseout=xiaoqing.start() style="color: #0000FF; font-size: 10pt; font-weight: bold; font-family:新细明体">文字跑马灯公告栏<br>在这输入文字内容<br></marquee>
</font></td></table>

<br>跳行语法


« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3