-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy paththemeButton.html
More file actions
24 lines (24 loc) · 867 Bytes
/
Copy paththemeButton.html
File metadata and controls
24 lines (24 loc) · 867 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<style>
.theme-switch-button {
position: fixed;
bottom: 20px;
right: 20px;
background-color: #fff;
border: none;
border-radius: 50%;
padding: 10px;
cursor: pointer;
z-index: 9999;
transition: transform 0.3s;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}
.theme-switch-button:hover {
transform: scale(1.1);
}
</style>
<button class="theme-switch-button" onclick="toggleTheme()">
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="24" height="24" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="6" opacity=".3"></circle>
<path fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2" d="M24,12h-3 M3,12H0 M12,3V0 M12,24v-3 M20.5,20.5l-2.1-2.1 M5.6,5.6L3.5,3.5 M20.5,3.5l-2.1,2.1 M5.6,18.4 l-2.1,2.1 M12,6c-3.3,0-6,2.7-6,6s2.7,6,6,6s6-2.7,6-6S15.3,6,12,6z"></path>
</svg>
</button>