第 二 章 标 签 应 用
第六节 移动文字(5)
本节继续学习移动文字。下面讲解五种移动文字代码。“走走停停的文字代码”,给你提供了三种形式。这些代码中的文字,都是由两个移动标签包围的(也可以说是控制的、指挥的、装饰的。)认真观察它们的效果,学会应用这些代码。
1、向右上移动的文字代码:
<marquee direction="up" height="400" width="500" scrollAmount="4">
<marquee direction="right" scrollAmount="4">
<font style="line-height: normal; font-size: 30pt; font-style: normal; font-variant: normal; font-weight: normal;" color="#ff0000"><b>“春天没来”欢迎您</b><br><b>“春天没来”欢迎您</b><br><b>“春天没来”欢迎您</b></font></marquee></marquee>
代码解析:
1、三行“春天没来欢迎您”的文字被两个移动标签包围着,第一个移动标签的移动方向“向上”,第二个移动标签的移动方向“向右”,综合效果是向“右上”。这两个移动标签可以互换位置。
2、文字标签<font style="line-height: normal; font-size: 30pt; font-style: normal; font-variant: normal; font-weight: normal;" color="#ff0000">解析:
<文字标签 css样式=“行高:默认;文字字号:30pt;字体风格:默认;小型大写字母的字体显示文本:默认;文本的粗细:默认;”颜色=红色>
2、向左上移动的文字代码:
<marquee direction="up" height="400" width="500" scrollAmount="4">
<marquee direction="" scrollAmount="4">
<font style="line-height: normal; font-size: 30pt; font-style: normal; font-variant: normal; font-weight: normal;" color="#ff0000"><b>“春天没来”欢迎您</b><br><b>“春天没来”欢迎您</b><br><b>“春天没来”欢迎您</b></font></marquee></marquee>
代码解析:
1、三行“春天没来欢迎您”的文字被两个移动标签包围着,第一个移动标签的移动方向“向上”,第二个移动标签的移动方向“向左”,综合效果是向“左上”。这两个移动标签可以互换位置。
2、文字标签<font style="line-height: normal; font-size: 30pt; font-style: normal; font-variant: normal; font-weight: normal;" color="#ff0000">解析:
<文字标签 css样式=“行高:默认;文字字号:30pt;字体风格:默认;小型大写字母的字体显示文本:默认;文本的粗细:默认;”颜色=红色>
3、向右下移动的文字代码:
<marquee direction="down" height="400" width="500" scrollAmount="4">
<marquee direction="right" scrollAmount="4">
<font style="line-height: normal; font-size: 30pt; font-style: normal; font-variant: normal; font-weight: normal;" color="#ff0000"><b>“春天没来”欢迎您</b><br><b>“春天没来”欢迎您</b><br><b>“春天没来”欢迎您</b></font></marquee></marquee>
代码解析:
1、三行“春天没来欢迎您”的文字被两个移动标签包围着,第一个移动标签的移动方向“向下”,第二个移动标签的移动方向“向右”,综合效果是向“右下”。这两个移动标签可以互换位置。
2、文字标签<font style="line-height: normal; font-size: 30pt; font-style: normal; font-variant: normal; font-weight: normal;" color="#ff0000">解析:
<文字标签 css样式=“行高:默认;文字字号:30pt;字体风格:默认;小型大写字母的字体显示文本:默认;文本的粗细:默认;”颜色=红色>
4、向左下移动的文字代码:
<marquee direction="down" height="400" width="500" scrollAmount="4">
<marquee direction="" scrollAmount="4">
<font style="line-height: normal; font-size: 30pt; font-style: normal; font-variant: normal; font-weight: normal;" color="#ff0000"><b>“春天没来”欢迎您</b><br><b>“春天没来”欢迎您</b><br><b>“春天没来”欢迎您</b></font></marquee></marquee>
代码解析:
1、三行“春天没来欢迎您”的文字被两个移动标签包围着,第一个移动标签的移动方向“向下”,第二个移动标签的移动方向“向左”,综合效果是向“左下”。这两个移动标签可以互换位置。
2、文字标签<font style="line-height: normal; font-size: 30pt; font-style: normal; font-variant: normal; font-weight: normal;" color="#ff0000">解析:
<文字标签 css样式=“行高:默认;文字字号:30pt;字体风格:默认;小型大写字母的字体显示文本:默认;文本的粗细:默认;”颜色=红色>
5、走走停停的文字代码
代码(1):
<marquee behavior="alternate" width="100%">
<marquee behavior="alternate" width="90%"><font style="line-height: normal; font-size: 30pt; font-style: normal; font-variant: normal; font-weight: normal;" color="#ff0000"><b>“春天没来”欢迎您</b></font></marquee></marquee>
代码(2):
<marquee behavior="alternate" width="100%">
<marquee width="96%"><font style="line-height: normal; font-size: 30pt; font-style: normal; font-variant: normal; font-weight: normal;" color="#ff0000"><b>“春天没来”欢迎您</b></font></marquee></marquee>
代码(3):
<marquee behavior="alternate" width="100%" scrollAmount="20">
<marquee width="96%"><font style="line-height: normal; font-size: 30pt; font-style: normal; font-variant: normal; font-weight: normal;" color="#ff0000"><b>“春天没来”欢迎您</b></font></marquee></marquee>
代码解析:
1、“走走停停的文字”要用两个移动标签控制。两个移动标签内可以都设置“来回走”的移动方式,也可以只在一个移动标签中设置;两个移动标签内的移动屏幕宽度,一个设置得要宽一点,另一个设置得要窄一点;移动速度,可以设置也可以不设置。
2、仔细观察一下,上面的三种“走走停停的文字”,效果是有区别的。
作业:
1、认真阅读“代码解析”,深刻领会上面各种代码设置的道理,学会应用这些代码。
2、用上面讲解的7种代码,各发表一篇文章。代码中的属性与属值可以修改。要认真观察发表以后的显示效果,把你修改成功的代码保存下来。