六个拿来就能用的有趣网页特效

简介: 上学期写大作业时收集的一些拿来直接用的网页特效,我还用服务器生成了 script 链接,只需一条标签就可以使用啦,如果你觉得这样会影响网站加载速度,没关系,你可以将其下载下来使用

文章目录


1. 看板娘


2. 鼠标点击出现自定义文字


3. 樱花飘落特效


4. 小猫返回顶部


5. 可爱登录


6. 点击爆炸


1. 看板娘


效果预览

e69468661cd44b3883ef7da04f5b0e58 (1).gif



代码

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>看板娘</title>
</head>
<body>
    <!-- 看板娘 -->
    <script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css" />
    <script src="https://cdn.jsdelivr.net/gh/stevenjoezhang/live2d-widget/autoload.js"></script>
</body>
</html>


2. 鼠标点击出现自定义文字


效果预览


253fefeb5cef43d3b63873492c9f7a80.gif


引入jquery

<script src="http://zhouql.vip/cdn/click1.js"></script>


代码


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        div {
            height: 100vh;
        }
    </style>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
</head>
<body style="width: 100%;height: 100%;">
    <div></div>
    <script src="http://zhouql.vip/cdn/click1.js"></script> 
</body>
</html>


3. 樱花飘落特效


效果预览


c0a7fe57cf4d480abbcbcf12b58354fa.gif


代码


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>樱花特效</title>
</head>
<body>
    <script type="text/javascript"
        src="https://cdn.jsdelivr.net/gh/Fuukei/Public_Repository@latest/static/js/sakura-less.js"></script>
</body>
</html>


4. 小猫返回顶部


效果预览

1b5d5b36ee84453499d77f7f1a3c4cf1.gif


代码

源码下载


<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>返回顶部</title>
    <link rel="stylesheet" type="text/css" href="http://zhouql.vip/cdn/css/szgotop.css" />
</head>
<body style="height: 2000px;">
    <div class="back-to-top cd-top faa-float animated cd-is-visible" style="top: -900px;"></div>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
    <script src="http://zhouql.vip/cdn/szgotop.js"></script> 
</body>
</html>


5. 可爱登录


效果预览


c507df229ca74274870a6bb12fa66909.gif


在线访问

点击这里


文件目录


7fc6df6cdc4f412f8c15d96266e97d5f.png


图片素材

素材

素材


html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>掘金登录小案例</title>
    <!-- bootstrap4图标库引入 -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css">
    <!-- css文件引入 -->
    <link rel="stylesheet" href="./index.css">
    <!-- 网站图标 -->
    <link rel="shortcut icon" href="http://zhouql.vip/images/tou/t1.png" type="image/x-icon">
</head>
<body>
    <div id="app">
        <form action="" method="get">
            <button></button>
            <h2>手机登录</h2>
            <p><input type="text" name="" autofocus id="phone" placeholder="请输入手机号"></p>
            <p><input type="password" name="" id="pwd" placeholder="验证码"></p>
            <p><input type="submit" value="登录"></p>
            <a href="">其他登录方式</a>
            <p><span>注册登录即表示同意 <small>用户协议,隐私政策</small></span></p>
        </form>
        <img class="t1" src="./images/4f6f6f316cde4398d201cd67e44ddea3.svg" alt="">
        <img class="t2" src="./images/500c1180a96859e5c54a5359f024a397.svg" alt="">
    </div>
    <script>
        document.querySelector('#phone').addEventListener('focus',function(){
            document.querySelector('.t2').style.display = "block";
        });
        document.querySelector('#phone').addEventListener('blur',function(){
            document.querySelector('.t2').style.display = "none";
        });
        document.querySelector('#pwd').addEventListener('focus',function(){
            document.querySelector('.t1').style.display = "block";
        });
        document.querySelector('#pwd').addEventListener('blur',function(){
            document.querySelector('.t1').style.display = "none";
        });
        document.querySelector('button').addEventListener('click',function(e){
            document.body.style.backgroundColor = "#fff";
            document.querySelector('#app').style.display = "none";
            e.preventDefault();
        });
    </script>
</body>
</html>


css


*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body{
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #aaabab;
}
#app{
    position: relative;
    height: 290px;
    width: 350px;
    background-color: #fff;
}
#app form{
    position: relative;
    padding: 20px;
}
#app form h2{
    color: #333333;
    font-size: 18px;
    user-select: none;
}
#app form p input{
    width: 100%;
    height: 38px;
    color: #828282;
    border: 1px solid #ddd;
    padding-left: 8px;
    margin-top: 18px;
    border-radius: 2px;
    outline: none;
}
#app form p:nth-of-type(3) input{
    background-color: #007fff;
    color: #edf6ff;
}
#app form a{
    text-decoration: none;
    color: #198fff;
    margin: 10px 0;
    display: inline-block;
    font-size: 15px;
}
#app form p span{
    margin-top: 10px;
    font-size: 14px;
    color: #847f7a;
}
#app form p span small{
    font-size: 14px;
    color: #198fff;
}
button{
    position: absolute;
    top: 20px;
    right: 20px;
    border: none;
    background-color: transparent;
    cursor: pointer;
}
button::after{
    font-family: "bootstrap-icons";
    content: '\F62A';
    font-size: 24px;
    color: #afafaf;
}
#app img{
    position: absolute;
    width: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
}
#app img:nth-of-type(1){
    top: -64px;
}
#app img:nth-of-type(2){
    top: -62px;
}


6. 点击爆炸


效果预览

4ac5b66f58b845279f6513ca341f57a1.gif


引入


<!--给网站添加鼠标点击爆炸五颜六色特效-->
<script src="http://zhouql.vip/cdn/blast.js"></script>


相关文章
|
应用服务中间件 Linux 网络安全
linux下查找nginx.conf文件路径的方法
nginx.conf文件在哪?云吞铺子介绍Linux系统下查找nginx.conf配置文件的方法。 查找nginx.conf 1、SSH连接Linux服务器,命令:ssh root@你的服务器IP 2、执行命令:nginx -t回车,即可看到nginx.conf文件所在目录 3、cd进入目录,vi nginx.conf编辑nginx.conf文件即可。
8320 0
|
3月前
|
数据采集 搜索推荐 API
速来!小红书电商 API 接口,解锁种草数据新玩法
在数字化电商时代,小红书电商 API 成为品牌与开发者挖掘“种草”数据价值的关键工具。本文详解 API 的使用方法、核心优势及实战案例,助你实现精准营销与创新应用,抢占市场先机。
323 1
|
6月前
|
前端开发 持续交付 网络安全
零成本快速搭建美观个人网站
这是一份详细的零成本个人网站搭建指南,采用 Hugo + PaperMod 主题生成静态网站并托管于 GitHub Pages,实现全自动部署与全球 CDN 加速。方案包含基础配置、内容添加、进阶美化技巧及优化方法,如配色调整、响应式布局和 SEO 优化等。相比传统 WordPress 方案,本方法完全免费、加载速度快且无需服务器维护,适合开发者快速建立专业在线形象。
305 6
|
安全 Java 编译器
解决Java中的“Unchecked cast: java.lang.Object to java.util.List”问题
解决Java中的“Unchecked cast: java.lang.Object to java.util.List”问题
1169 0
|
10月前
|
Java
java switch case多个条件
通过本文的介绍,我们详细探讨了Java中 `switch case`语句的多种用法和优化方法。从基本语法到合并多个条件,再到使用枚举、常量和函数优化,`switch case`语句在Java编程中提供了一种灵活且高效的控制流方式。掌握这些技巧,能够编写出更加简洁、可读性强的代码,提高开发效率和代码质量。希望本文能为您在实际开发中提供有价值的参考和指导。
886 2
|
Web App开发 XML 数据可视化
MathML详解
MathML(数学标记语言)是一种基于XML的语言,用于在Web页面中结构化地展示数学公式和符号。它通过内容模型和表现模型描述数学表达式的语义和排版,广泛应用于教育、科学出版等领域,并支持屏幕阅读器提升可访问性。尽管现代浏览器如Firefox对其支持良好,但在某些浏览器中可能需额外插件才能正确渲染。MathML的优点包括结构化表示和高可读性,但也存在一定的学习曲线和兼容性问题。
Warning: To load an ES module, set “type“: “module“ in the package.json or use the .mjs extension.
Warning: To load an ES module, set “type“: “module“ in the package.json or use the .mjs extension.
|
机器学习/深度学习 数据采集 算法框架/工具
使用Python实现深度学习模型:智能人力资源管理与招聘
【8月更文挑战第12天】 使用Python实现深度学习模型:智能人力资源管理与招聘
414 2
|
缓存
【已解决】npm安装依赖报错: npm ERR! cb() never called! npm ERR! This is an error with npm itself.
【已解决】npm安装依赖报错: npm ERR! cb() never called! npm ERR! This is an error with npm itself.
3356 0
|
移动开发 前端开发 JavaScript
学习Particles.js 给网页来点粒子特效
学习Particles.js 给网页来点粒子特效
493 0