forked from eunji-0623/GlobalNomad
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
172 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
.switch { | ||
position: relative; | ||
width: 65px; | ||
height: 25px; | ||
margin: 0px; | ||
appearance: none; | ||
-webkit-appearance: none; | ||
background-color: #afb9c9; | ||
background-size: cover; | ||
background-repeat: no-repeat; | ||
border-radius: 12.5px; | ||
box-shadow: inset 0px 0px 1px rgba(255, 255, 255, 0.7); | ||
transition: background-image 0.7s ease-in-out; | ||
outline: none; | ||
cursor: pointer; | ||
overflow: hidden; | ||
} | ||
|
||
.switch:checked { | ||
background-color: #44474d; | ||
background-size: cover; | ||
transition: background-image 1s ease-in-out; | ||
} | ||
|
||
.switch:after { | ||
content: ''; | ||
width: 23px; | ||
height: 23px; | ||
border-radius: 50%; | ||
background-color: #fff; | ||
position: absolute; | ||
left: 1px; | ||
top: 1px; | ||
transform: translateX(0px); | ||
animation: off 0.7s forwards cubic-bezier(.8, .5, .2, 1.4); | ||
box-shadow: inset 2.5px -2.5px 2px rgba(53, 53, 53, 0.3); | ||
} | ||
|
||
@keyframes off { | ||
0% { | ||
transform: translateX(40px); | ||
width: 23px; | ||
} | ||
50% { | ||
width: 37.5px; | ||
border-radius: 12.5px; | ||
} | ||
100% { | ||
transform: translateX(0px); | ||
width: 23px; | ||
} | ||
} | ||
|
||
.switch:checked:after { | ||
animation: on 0.7s forwards cubic-bezier(.8, .5, .2, 1.4); | ||
box-shadow: inset -2.5px -2.5px 2px rgba(53, 53, 53, 0.3); | ||
} | ||
|
||
@keyframes on { | ||
0% { | ||
transform: translateX(0px); | ||
width: 23px; | ||
} | ||
50% { | ||
width: 37.5px; | ||
border-radius: 12.5px; | ||
} | ||
100% { | ||
transform: translateX(40px); | ||
width: 23px; | ||
} | ||
} | ||
|
||
.switch:checked:before { | ||
content: ''; | ||
width: 10px; | ||
height: 10px; | ||
border-radius: 50%; | ||
position: absolute; | ||
left: 7.5px; | ||
top: 7.5px; | ||
transform-origin: 26.5px 5px; | ||
background-color: transparent; | ||
box-shadow: 2.5px -0.5px 0px #fff; | ||
filter: blur(0px); | ||
animation: sun 0.7s forwards ease; | ||
} | ||
|
||
@keyframes sun { | ||
0% { | ||
transform: rotate(170deg); | ||
background-color: transparent; | ||
box-shadow: 2.5px -0.5px 0px #fff; | ||
filter: blur(0px); | ||
} | ||
50% { | ||
background-color: transparent; | ||
box-shadow: 2.5px -0.5px 0px #fff; | ||
filter: blur(0px); | ||
} | ||
90% { | ||
background-color: #f5daaa; | ||
box-shadow: 0px 0px 5px #f5deb4, | ||
0px 0px 10px #f5deb4, | ||
0px 0px 15px #f5deb4, | ||
inset 0px 0px 1px #efd3a3; | ||
filter: blur(0.5px); | ||
} | ||
100% { | ||
transform: rotate(0deg); | ||
background-color: #f5daaa; | ||
box-shadow: 0px 0px 5px #f5deb4, | ||
0px 0px 10px #f5deb4, | ||
0px 0px 15px #f5deb4, | ||
inset 0px 0px 1px #efd3a3; | ||
filter: blur(0.5px); | ||
} | ||
} | ||
|
||
.switch:before { | ||
content: ''; | ||
width: 12px; | ||
height: 12px; | ||
border-radius: 50%; | ||
position: absolute; | ||
left: 10px; | ||
top: 9px; | ||
filter: blur(0.5px); | ||
background-color: #f5daaa; | ||
box-shadow: 0px 0px 5px #f5deb4, | ||
0px 0px 10px #f5deb4, | ||
0px 0px 15px #f5deb4, | ||
inset 0px 0px 1px #efd3a3; | ||
transform-origin: 26.5px 5px; | ||
animation: moon 0.7s forwards ease; | ||
} | ||
|
||
@keyframes moon { | ||
0% { | ||
transform: rotate(0deg); | ||
filter: blur(0.5px); | ||
} | ||
50% { | ||
filter: blur(0.5px); | ||
} | ||
90% { | ||
background-color: transparent; | ||
box-shadow: 2.5px -0.5px 0px #fff; | ||
filter: blur(0px); | ||
} | ||
100% { | ||
transform: rotate(170deg); | ||
background-color: transparent; | ||
box-shadow: 2.5px -0.5px 0px #fff; | ||
filter: blur(0px); | ||
} | ||
} | ||
|