以typecho为例,在主题的header.php中添加相关代码
代码如下:
// 1、来回滚动
<marquee behavior=" alternate "><font color=red>文字来回滚动 </marquee>
// 2、设置滚动次数,这里已三次为例
<marquee loop=3 width=50% behavior=scroll>文字只走3趟 </marquee>
// 3、设置滚动方向,left是文字自右向左移,right是文字自左向右移
<marquee direction=left>文字自右向左移</marquee>
// 4、设置滚动频率
<marquee scrollamount=8>
文字很快滚。
</marquee>
以下是我的网站上方的字幕代码:
<marquee direction="left" onmouseout="this.start()" onmouseover="this.stop()">
<strong>
<img src="https://picabstract-preview-ftn.weiyun.com/ftn_pic_abs_v3/567c03c986180dcb04327a153927bd5c8a39ccf642a03cb40ebf40d2b1ded20c47be54641d27a0bfee9e5bd9d91cbf7e?pictype=scale&from=30113&version=3.3.3.3&uin=1823782755&fname=%E5%85%AC%E5%91%8A%20%281%29.png&size=750" width="23px" height="23px">
<font size="3">
: 欢迎来到51学代码,一个专注于编程技术分享、知识导航、IT技术学习的网站!本站旗下导航网
<a href="https://nav.51xcode.com" style="color:red">nav.51xcode.com</a>
</font>
</strong>
</marquee>
2022-05-29 21:34:20 星期日
免责声明:
更多知识,请关注微信公众号“51学代码”


© 版权声明
THE END