Skip to content

Instantly share code, notes, and snippets.

@vaebe
Created November 21, 2024 09:51
Show Gist options
  • Save vaebe/93c874100ece1a7961ab615f54bc2d1c to your computer and use it in GitHub Desktop.
Save vaebe/93c874100ece1a7961ab615f54bc2d1c to your computer and use it in GitHub Desktop.
leaflet-popup 边框流光效果
.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);
}
}
}
@vaebe
Copy link
Author

vaebe commented Nov 21, 2024

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment