温馨提示:本文最后更新于
2024-10-04 13:53:24
,某些文章具有时效性,若有错误或已失效,请联系星雨站长!前言
最近挺多人找我要首页的滚动banner教程,所以今天把代码整理了一下放博客里,需要的自取!!
声明一下,这个是张洪heo的原创,被我扒了过来,前段时间发布过一版,最近又在上一版的基础上进行了一些修改和优化,目前还没有对手机端去做一些适配(主要有点懒)!!
目前本站使用的版本是腾飞发给我的,相对于我整理的这一款,他做了右侧的推荐文章,适配了移动端,添加了canvas动画特效,并做成了一个小工具,个人感觉我自己整理出来的这一款已经够用了,毕竟免费发出来了,如果你觉得有所不足,可以自行前往腾飞的站点购买完整版本!!
演示图
HTML代码
<link rel="stylesheet" href="/*CSS文件路径*/">
<div id="home_top">
<style type="text/css">
.todayCard-title,
.todayCard-tips,
.topGroup.banner-button {
color: #ffffff
}
.topGroup.todayCard {
background: #000000
}
</style>
<div class="recent-top-post-group" id="recent-top-post-group">
<div class="recent-post-top" id="recent-post-top">
<div id="bannerGroup">
<div id="banners">
<div class="banners-title">
<div class="banners-title-big">
分享设计
</div>
<div class="banners-title-big">
与科技生活
</div>
<div class="banners-title-small">
WNIUI.COM
</div>
</div>
<!--wniui.com -->
<div class="tags-group-all">
<div class="tags-group-wrapper">
<div class="tags-group-icon-pair">
<div class="tags-group-icon" style="background:#989bf8">
<img title="AfterEffects"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'"
class="entered exited"
src="https://p.zhheo.com/20239df3f66615b532ce571eac6d14ff21cf072602.png!cover">
</div>
<div class="tags-group-icon" style="background:#ffffff">
<img src="https://p.zhheo.com/2023e0ded7b724a39f12d59c3dc8fbdc7cbe074202.png!cover"
title="Sketch"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'">
</div>
</div>
<div class="tags-group-icon-pair">
<div class="tags-group-icon" style="background:#57b6e6">
<img title="Docker"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'"
class="entered exited"
src="https://p.zhheo.com/20231108a540b2862d26f8850172e4ea58ed075102.png!cover">
</div>
<div class="tags-group-icon" style="background:#4082c3">
<img src="https://p.zhheo.com/2023e4058a91608ea41751c4f102b131f267075902.png!cover"
title="Photoshop"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'">
</div>
</div>
<div class="tags-group-icon-pair">
<div class="tags-group-icon" style="background:#ffffff">
<img src="https://p.zhheo.com/20233e777652412247dd57fd9b48cf997c01070702.png!cover"
title="FinalCutPro"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'"
data-ll-status="" class="entered ">
</div>
<div class="tags-group-icon" style="background:#ffffff">
<img src="https://p.zhheo.com/20235c0731cd4c0c95fc136a8db961fdf963071502.png!cover"
title="Python"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'">
</div>
</div>
<div class="tags-group-icon-pair">
<div class="tags-group-icon" style="background:#eb6840">
<img title="Swift"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'"
class="entered "
src="https://p.zhheo.com/202328bbee0b314297917b327df4a704db5c072402.png!cover"
data-ll-status="">
</div>
<div class="tags-group-icon" style="background:#8f55ba">
<img title="Principle"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'"
class="entered exited"
src="https://p.zhheo.com/2023f76570d2770c8e84801f7e107cd911b5073202.png!cover">
</div>
</div>
<div class="tags-group-icon-pair">
<div class="tags-group-icon" style="background:#f29e39">
<img title="illustrator"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'"
class="entered "
src="https://p.zhheo.com/20237359d71b45ab77829cee5972e36f8c30073902.png!cover"
data-ll-status="">
</div>
<div class="tags-group-icon" style="background:#2c51db">
<img src="https://p.zhheo.com/20237c548846044a20dad68a13c0f0e1502f074602.png!cover"
title="CSS3"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'"
data-ll-status="" class="entered ">
</div>
</div>
<!--wniui.com -->
<div class="tags-group-icon-pair">
<div class="tags-group-icon" style="background:#f7cb4f">
<img title="JS"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'"
class="entered "
src="https://p.zhheo.com/2023786e7fc488f453d5fb2be760c96185c0075502.png!cover"
data-ll-status="">
</div>
<div class="tags-group-icon" style="background:#e9572b">
<img title="HTML"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'"
class="entered "
src="https://p.zhheo.com/202372b4d760fd8a497d442140c295655426070302.png!cover"
data-ll-status="">
</div>
</div>
<div class="tags-group-icon-pair">
<div class="tags-group-icon" style="background:#df5b40">
<img title="Git"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'"
class="entered "
src="https://p.zhheo.com/2023ffa5707c4e25b6beb3e6a3d286ede4c6071102.png!cover"
data-ll-status="">
</div>
<div class="tags-group-icon" style="background:#1f1f1f">
<img title="Rhino"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'"
class="entered "
src="https://p.zhheo.com/20231ca53fa0b09a3ff1df89acd7515e9516173302.png!cover"
data-ll-status="">
</div>
</div>
<div class="tags-group-icon-pair">
<div class="tags-group-icon" style="background:#989bf8">
<img title="AfterEffects"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'"
class="entered exited"
src="https://p.zhheo.com/20239df3f66615b532ce571eac6d14ff21cf072602.png!cover">
</div>
<div class="tags-group-icon" style="background:#ffffff">
<img title="Sketch"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'"
class="entered exited"
src="https://p.zhheo.com/2023e0ded7b724a39f12d59c3dc8fbdc7cbe074202.png!cover">
</div>
</div>
<!--wniui.com -->
<div class="tags-group-icon-pair">
<div class="tags-group-icon" style="background:#57b6e6">
<img title="Docker"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'"
class="entered exited"
src="https://p.zhheo.com/20231108a540b2862d26f8850172e4ea58ed075102.png!cover">
</div>
<div class="tags-group-icon" style="background:#4082c3">
<img title="Photoshop"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'"
class="entered exited"
src="https://p.zhheo.com/2023e4058a91608ea41751c4f102b131f267075902.png!cover">
</div>
</div>
<div class="tags-group-icon-pair">
<div class="tags-group-icon" style="background:#ffffff">
<img title="FinalCutPro"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'"
class="entered exited"
src="https://p.zhheo.com/20233e777652412247dd57fd9b48cf997c01070702.png!cover">
</div>
<div class="tags-group-icon" style="background:#ffffff">
<img title="Python"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'"
class="entered exited"
src="https://p.zhheo.com/20235c0731cd4c0c95fc136a8db961fdf963071502.png!cover">
</div>
</div>
<div class="tags-group-icon-pair">
<div class="tags-group-icon" style="background:#eb6840">
<img title="Swift"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'"
class="entered exited"
src="https://p.zhheo.com/202328bbee0b314297917b327df4a704db5c072402.png!cover">
</div>
<div class="tags-group-icon" style="background:#8f55ba">
<img title="Principle"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'"
class="entered exited"
src="https://p.zhheo.com/2023f76570d2770c8e84801f7e107cd911b5073202.png!cover">
</div>
</div>
<div class="tags-group-icon-pair">
<div class="tags-group-icon" style="background:#f29e39">
<img title="illustrator"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'"
class="entered exited"
src="https://p.zhheo.com/20237359d71b45ab77829cee5972e36f8c30073902.png!cover">
</div>
<div class="tags-group-icon" style="background:#2c51db">
<img title="CSS3"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'"
class="entered exited"
src="https://p.zhheo.com/20237c548846044a20dad68a13c0f0e1502f074602.png!cover">
</div>
</div>
<!-- 星雨-wniui.com -->
<div class="tags-group-icon-pair">
<div class="tags-group-icon" style="background:#f7cb4f">
<img src="https://p.zhheo.com/2023786e7fc488f453d5fb2be760c96185c0075502.png!cover"
title="JS"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'">
</div>
<div class="tags-group-icon" style="background:#e9572b">
<img src="https://p.zhheo.com/202372b4d760fd8a497d442140c295655426070302.png!cover"
title="HTML"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'">
</div>
</div>
<div class="tags-group-icon-pair">
<div class="tags-group-icon" style="background:#df5b40">
<img src="https://p.zhheo.com/2023ffa5707c4e25b6beb3e6a3d286ede4c6071102.png!cover"
title="Git"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'">
</div>
<div class="tags-group-icon" style="background:#1f1f1f">
<img src="https://p.zhheo.com/20231ca53fa0b09a3ff1df89acd7515e9516173302.png!cover"
title="Rhino"
onerror="this.onerror=null;this.src='https://bu.dusays.com/2023/03/03/6401a79030db5.png'">
</div>
</div>
</div>
</div>
<a id="banner-hover" href="/?random" data-pjax-state="">
<i class="heofont icon-right">
</i>
<span class="bannerText">
随便逛逛
</span>
</a>
</div>
<!-- 星雨-wniui.com -->
<div class="categoryGroup">
<div class="categoryItem">
<a class="categoryButton wniui_one" href="/tags/必看/" data-pjax-state="">
<span class="categoryButtonText">
必看精选
</span>
<i class="heofont icon-star-smile-fill">
</i>
</a>
</div>
<div class="categoryItem">
<a class="categoryButton wniui_two" href="/tags/热门/" data-pjax-state="">
<span class="categoryButtonText">
热门文章
</span>
<i class="heofont icon-fire-fill">
</i>
</a>
</div>
<div class="categoryItem">
<a class="categoryButton wniui_three" href="/tags/教程/" data-pjax-state="">
<span class="categoryButtonText">
实用教程
</span>
<i class="heofont icon-book-mark-fill">
</i>
</a>
</div>
</div>
</div>
<div class="topGroup">
<div class="todayCard" id="todayCard" style="z-index: 1;">
<div class="todayCard-info">
<div class="todayCard-tips">
星雨博客
</div>
<div class="todayCard-title">记录生活 留住感动
</div>
</div>
<div class="todayCard-cover"
style="background: url('https://oss.zibll.com/zibll.com/2024/08/20240822081924877-%E3%80%90%E5%93%B2%E9%A3%8E%E5%A3%81%E7%BA%B8%E3%80%912024-08-22-08_17_28.jpg') no-repeat center /cover">
</div>
<div class="banner-button-group">
<a class="banner-button" href="/newposts.html">
<i class="heofont icon-add-circle-fill">
</i>
<span class="banner-button-text">
发布文章
</span>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
下载地址
© 版权声明
本文是原创文章,采用CC BY-NC-SA 4.0协议,完整转载请注明来自星雨の博客
THE END