网络编程 
首页 > 网络编程 > 浏览文章

jQuery实现弹幕特效

(编辑:jimmy 日期: 2024/5/30 浏览:3 次 )

案例简介

jQuery实现弹幕效果,代码如下。

案例目录

jQuery实现弹幕特效

HTML部分

<!DOCTYPE html>


<html>
 <head>
 <meta charset="utf-8">
 <title>jQuery弹幕案例</title>
 <link rel="stylesheet" type="text/css" href="style.css" rel="external nofollow" />
 </head>
 <body>
 <div class="box">
 <div class="top"></div>
 <div class="bot">
 <input type="text" id="txt" placeholder="我来说两句。。。" />
 <button type="button" id="btn">发送</button>
 </div>
 </div>
 <script src="/UploadFiles/2021-04-02/jquery-1.12.4.js">

CSS部分

* {
 margin: 0;
 padding: 0;
}

.box {
 width: 1600px;
 height: 757px;
}

.top {
 width: 100%;
 height: 660px;
 position: relative;
}

.bot {
 width: 100%;
 height: 97px;
 background-color: #666666;
 position: relative;
}

#txt {
 width: 300px;
 height: 30px;
 border-radius: 5px;
 position: absolute;
 left: 50%;
 margin-left: -150px;
 top: 50%;
 margin-top: -15px;
 border: none;
}

#btn {
 width: 60px;
 height: 30px;
 color: white;
 background-color: red;
 position: absolute;
 left: 955px;
 top: 34px;
 border: none;
}

span {
 position: absolute;
 color: #000;
 font-size: 50px;
 line-height: 1.5em;
 cursor: pointer;
 white-space: nowrap;
}

效果展示

jQuery实现弹幕特效

以上就是jQuery实现弹幕效果的代码,希望对您有帮助!

源码下载:jQuery弹幕

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。

上一篇:Vue基础配置讲解
下一篇:Vue实现多标签选择器
高通与谷歌联手!首款骁龙PC优化Chrome浏览器发布
高通和谷歌日前宣布,推出首次面向搭载骁龙的Windows PC的优化版Chrome浏览器。
在对骁龙X Elite参考设计的初步测试中,全新的Chrome浏览器在Speedometer 2.1基准测试中实现了显著的性能提升。
预计在2024年年中之前,搭载骁龙X Elite计算平台的PC将面世。该浏览器的提前问世,有助于骁龙PC问世就获得满血表现。
谷歌高级副总裁Hiroshi Lockheimer表示,此次与高通的合作将有助于确保Chrome用户在当前ARM兼容的PC上获得最佳的浏览体验。
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网