css实现圆环滚动图片幻灯片切换效果代码
代码语言:html
所属分类:幻灯片
代码描述:css实现圆环滚动图片幻灯片切换效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> .gallery { --s: 280px; /* control the size */ display: grid; width: var(--s); aspect-ratio: 1; overflow: hidden; padding: calc(var(--s)/20); border-radius: 50%; position: relative; } .gallery::after { content: ""; position: absolute; inset: 0; padding: inherit; border-radius: inherit; background: repeating-conic-gradient(#789048 0 30deg,#DFBA69 0 60deg); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; } .gallery > img { grid-area: 1/1; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; transform-origin: 50% 120.7%; } .gallery::after, .gallery > img { animation: m 8s infinite cubic-bezier(.5,-0.2,.5,1.2); } .gallery > img:nth-child(2) {animation-delay: -2s} .gallery > img:nth-child(3) {animation-delay: -4s} .gallery .........完整代码请登录后点击上方下载按钮下载查看
网友评论0