Created
November 21, 2024 09:51
-
-
Save vaebe/93c874100ece1a7961ab615f54bc2d1c to your computer and use it in GitHub Desktop.
leaflet-popup 边框流光效果
This file contains hidden or 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
.leaflet-popup-content-wrapper { | |
position: relative; | |
overflow: hidden; | |
&::before { | |
content: ''; | |
position: absolute; | |
left: -50%; | |
top: -50%; | |
width: 200%; | |
height: 200%; | |
background: conic-gradient(transparent, rgba(168, 239, 255, 1), transparent 30%); | |
animation: rotate 4s linear infinite; | |
z-index: 0; | |
} | |
&::after { | |
content: ''; | |
position: absolute; | |
top: 6px; | |
left: 6px; | |
width: calc(100% - 12px); | |
height: calc(100% - 12px); | |
background: rgba(0, 35, 106, 1); | |
z-index: 0; | |
} | |
@keyframes rotate { | |
100% { | |
transform: rotate(1turn); | |
} | |
} | |
} |
Author
vaebe
commented
Nov 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment