js+css实现每日签到打卡页面代码
代码语言:html
所属分类:其他
代码描述:js+css实现每日签到打卡页面代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>每日签到</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'PingFang SC','Microsoft YaHei',sans-serif
}
body {
background: linear-gradient(135deg,#6e8efb,#a777e3);
display: flex;
justify-content: center;
align-items: center;
color: white
}
.container {
background-color: rgba(255,255,255,0.9);
border-radius: 20px;
box-shadow: 0 15px 30px rgba(0,0,0,0.2);
width: 90%;
max-width: 500px;
padding: 30px;
color: #333
}
.header {
text-align: center;
margin-bottom: 30px
}
.header h1 {
font-size: 28px;
margin-bottom: 10px;
color: #6e8efb
}
.header p {
color: #888;
font-size: 14px
}
.calendar {
display: grid;
grid-template-columns: repeat(7,1fr);
gap: 8px;
margin-bottom: 30px
}
.calendar-header {
display: grid;
grid-template-columns: repeat(7,1fr);
margin-bottom: 15px;
text-align: center;
font-weight: bold;
color: #888;
font-size: 14px
}
.day {
aspect-ratio: 1;
display: flex;
justify-content: center;
align-items: center;
background-color: #f5f5f5;
border-radius: 50%;
font-size: 16px;
cursor: pointer;
transition: all .3s ease
}
.day:hover {
background-color: #e0e0e0
}
.day.has-checkin {
background-color: #6e8efb;
color: white
}
.day.today {
border: 2px solid #6e8efb;
font-weight: bold
}
.day.today.has-checkin {
border: 2px solid white
}
.checkin-btn {
width: 100%;
padding: 16px;
background: linear-gradient(135deg,#6e8efb,#a777e3);
color: white;
border: 0;
border-radius: 10px;
font-size: 18px;
cursor: pointer;
transition: all .3s ease;
margin-bottom: 20px;
box-shadow: 0 4px 10px rgba(110,142,251,0.3)
}
.checkin-btn:hover {
transform: translateY(-3px);
box-shadow: 0 6px 15px rgba(110,142,251,0.4)
}
.checkin-btn:active {
transform: translateY(1px)
}
.checkin-btn.checked {
background: linear-gradient(135deg,#4cd137,#44bd32)
}
.checkin-info {
background-color: #f9f9f9;
border-radius: 10px;
padding: 15px;
margin-bottom: 20px
}
.checkin-info h3 {
margin-bottom: 10px;
color: #555;
font-size: 16px
}
.checkin-info p {
font-size: 14px;
color: #777
}
.streak {
display: flex;
align-items: center;
margin-bottom: 20px
}
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0