当前位置:网站首页>六个拿来就能用的有趣网页特效
六个拿来就能用的有趣网页特效
2022-06-21 20:01:00 【程序员超时空】
上学期写大作业时收集的一些拿来直接用的网页特效,我还用服务器生成了 script 链接,只需一条标签就可以使用啦,如果你觉得这样会影响网站加载速度,没关系,你可以将其下载下来使用

文章目录
1. 看板娘
效果预览

代码
<!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. 鼠标点击出现自定义文字
效果预览
引入jquery
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
引入js
<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. 樱花飘落特效
效果预览
代码
<!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/[email protected]/static/js/sakura-less.js"></script>
</body>
</html>
4. 小猫返回顶部
效果预览
代码
<!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. 可爱登录
效果预览
在线访问
文件目录
图片素材
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/[email protected]/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. 点击爆炸
效果预览
引入
<!--给网站添加鼠标点击爆炸五颜六色特效-->
<script src="http://zhouql.vip/cdn/blast.js"></script>
边栏推荐
- Intelij idea efficient skills (I)
- 可以在网上炒股开户吗?是安全的吗
- Yx2811 landscape installation driver IC
- Write your own compiler: intermediate code generation for loop statements such as while, for, and do
- matplotlib plt. Details of subplots()
- Go unit test mocks the database CRUD
- 免费又好用的参考文献管理软件zotero该怎么使用?可以同时支持中文和英文吗?...
- Tianqi lithium passed the hearing: net profit of RMB 3.3 billion in a single quarter; jiangweiping and his wife are worth more than RMB 50billion
- JS中的构造函数(重点)
- ACM. Hj61 put apple ●
猜你喜欢

Jinghe integration has passed the registration: it plans to raise 9.5 billion yuan. Hefei Construction Investment and Midea are shareholders

哪些ipad的APP可以很好的阅读英文文献?

杰理之开启四声道通话近端变调问题【篇】

How to use the free and easy-to-use reference management software Zotero? Can I support both Chinese and English

杰理之开启四声道打开 EQ 后播歌卡顿问题【篇】

天齐锂业通过聆讯:单季净利33亿 蒋卫平夫妇身价超500亿

How to check the duplicate of an English paper?

JS object operation (much simpler than C object)

Caricature scientifique | Vous pouvez apprendre l'EEG en regardant les images. Voulez - vous essayer?

测评 | 在生活中,你是一位什么样的人呢?
随机推荐
Introduction to security encryption
从随便到无聊到有病
Go单元测试对数据库CRUD进行Mock测试
Definition of unused processing methods when compiling C51 with keil 5
Tx9118 Synchronous Boost IC
中微半导体通过注册:年营收11亿 实控人为新西兰国籍
英文论文如何进行润色?
在程序退出,defer 不执行是为什么
Go unit test mocks the database CRUD
Fm5012d small fan integrated IC scheme
Go语言单元测试模拟服务请求和接口返回
7.目标检测
K - Clairewd’s message HDU - 4300 (EXKMP)
9 strategies for improving software development process
Revenue and profit "ebb and flow", water drops turn in pain
Excuse me, which website is better for college students to check literature?
ACM. HJ35 蛇形矩阵 ●
On the charm of code language
ACM. Hj35 serpentine matrix ●
16 iterator classic case