Created
April 11, 2021 11:49
-
-
Save rohitotsubakura/478f2f0269a3cce3cb8a21330e65aec9 to your computer and use it in GitHub Desktop.
集中線CSS
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
body { background-color: rgba(255, 255, , 0); margin: 0px auto; overflow: hidden; position: relative; } | |
body::before { | |
--border-color: #fff; | |
content: ""; | |
display: block; | |
position: absolute; | |
top: calc(50% - 100vw); | |
left: calc(50% - 100vw); | |
width: 200vw; | |
height: 200vw; | |
background-image: repeating-conic-gradient( | |
transparent 0, | |
transparent 13deg, | |
var(--border-color) 13deg, | |
var(--border-color) 16deg | |
), | |
repeating-conic-gradient( | |
transparent 0, | |
transparent 20deg, | |
var(--border-color) 20deg, | |
var(--border-color) 30deg | |
); | |
animation-name: doya; | |
animation-duration: 5s; | |
animation-timing-function: linear; | |
animation-delay: 1s; | |
animation-iteration-count: infinite; | |
} | |
@keyframes doya { | |
from { | |
transform: rotate(0deg); | |
transform-origin: center; | |
-webkit-mask-image: radial-gradient( | |
transparent 0%, | |
transparent 12%, | |
white 30%, | |
white | |
); | |
} | |
to { | |
transform: rotate(360deg); | |
transform-origin: center; | |
-webkit-mask-image: radial-gradient( | |
transparent 0%, | |
transparent 20%, | |
white 40%, | |
white | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment