1.简述
- 作品名:粒子时钟效果
- 技术栈:HTML+CSS+JavaScript
- 我的博客:http://halo.axz99.cn(大家可以多关注一下,多多评论,后续我会发更多有趣的效果到我的博客中)
这是一个使用HTML+CSS+JS实现的一个比较还可以的粒子时钟效果,它可以获取到当前的系统时间,并可以随着每秒进行变化,这个作品主要是为了让各位小伙伴以及各位刚接触服务器相关知识的小伙伴搭建出一个属于自己的静态网站,出于大家可能没有素材考虑,作者大大在这里给大家现做了一个,虽说效果不是很炫酷,但是也可以做个静态网页部署到服务器中进行练手啦,如果后续还想要更多的效果的话,可以想先给作者点个星,或者去作者博客评论一波,后续我会发更多的效果到我的博客中供大家使用,咱们一起加油吧!
2.效果展示
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>
<style>
body{
background-color: black;
}
h1{
margin: 10px auto;
color: #fff;
position: absolute;
top: 5vw;
left: 65vh;
font-size: 7rem;
}
.items{
position: absolute;
top: 10vw;
left: 55vh;
margin: 150px auto;
width: 800px;
height: 450px;
display: flex;
justify-content: space-around;
align-items: center;
color:#fff;
}
.item{
width: 30%;
height: 90%;
/* background-color: #000; */
text-align: center;
border: 3px solid #fff;
transition: box-shadow 0.3s ease;
transition: all .5s;
border-radius: 0;
}
.item > .text{
line-height: 200px;
padding-top: 80px;
}
.h,.m,.s{
transition: all .5s;
font-size: 2rem;
font-family: '楷体';
opacity: 0;
}
.fitem:hover{
border: 3px solid rebeccapurple;
border-radius: 30px 0 30px 0;
}
.fitem:hover > .text{
font-size: 9rem;
color: rebeccapurple;
}
.fitem:hover > .h{opacity: 1;}
.sitem:hover{
border: 3px solid rgb(32, 53, 219);
border-radius: 30px 30px 0 0;
}
.sitem:hover > .m{opacity: 1;}
.sitem:hover > .text{
font-size: 9rem;
color: rgb(32, 53, 219);
}
.titem:hover{
border: 3px solid rgb(165, 37, 63);
border-radius: 0 30px 0 30px;
}
.titem:hover > .s{opacity: 1;}
.titem:hover > .text{
font-size: 9rem;
color: rgb(165, 37, 63);
}
.ge{
font-size: 7rem;
}
.item > .text {
font-size: 7rem;
color: #fff;
transition: all .5s;
}
</style>
<body>
<!-- 作者:王晓政 (小政同学)
邮箱:3415278922@qq.com
时间:2024年07月15日
博客:http://halo.axz99.cn/
欢迎大家来访问我的博客!
-->
<canvas id="canvad"></canvas>
<!-- 时钟 -->
<h1>现在时间是?</h1>
以下内容省略........................................................
4.源码获取地址
- Gitee地址:https://gitee.com/xiaoxing-classmate/lizi_time.git
- 下载完毕后别忘了给作者点星哈