-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcalendar.css
117 lines (103 loc) · 2.01 KB
/
calendar.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
font-size: 0.3rem;
}
.calendar-container {
background: white;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
overflow: hidden;
width: 8rem;
position: relative;
height: 8rem;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
background: #007BFF;
color: rgb(255, 255, 255);
}
.calendar {
padding: 10px;
}
.weekdays {
display: flex;
background: #f0f0f0;
padding: 10px 0;
}
.weekdays div {
flex: 1;
text-align: center;
font-weight: bold;
}
.days {
display: flex;
flex-wrap: wrap;
}
.days div {
width: calc(100% / 7);
padding: 10px;
text-align: center;
cursor: pointer;
border: 1px solid #f0f0f0;
box-sizing: border-box;
}
.days div:hover {
background: #007BFF;
color: white;
}
#prev-month,
#next-month {
border-radius: 0.3vw;
background-color: #ffffff;
cursor: pointer;
font-size: 0.2rem;
}
.today {
background-color: #ffcc00;
/* 标记今天的颜色 */
border: 2px solid #ff9900;
/* 边框颜色 */
}
.jump-to-today {
position: absolute;
/* 绝对定位 */
bottom: 10px;
/* 距离底部10像素 */
right: 10px;
/* 距离右边10像素 */
background-color: #007BFF;
/* 背景颜色 */
color: white;
/* 字体颜色 */
border: none;
/* 无边框 */
padding: 10px 15px;
/* 内边距 */
border-radius: 5px;
/* 圆角 */
cursor: pointer;
/* 鼠标悬停时为手指形状 */
z-index: 1;
/* 确保按钮在其他元素上方 */
font-size: 0.2rem;
}
.jump-to-today:hover {
background-color: #0056b3;
/* 悬停时按钮颜色变化 */
}
.punch-in {
border-radius: 50%;
border-style: solid;
border-color: black;
border-width: 2rem;
color: red;
}