css实现圈圈幻灯片切换效果代码
代码语言:html
所属分类:幻灯片
代码描述:css实现圈圈幻灯片切换效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { height: 100%; width: 100%; margin: 0; background: #222; overflow: hidden; } .outer { height: 100vh; width: 100vw; } .container { position: absolute; border-radius: 100%; top: 50vh; left: 50vw; border: 2px solid #fff; transform: translateY(-50%) translateX(-50%); background-size: 100vw 100vh; background-position: center center; transition: height 0.3s, width 0.3s, opacity 0.3s, box-shadow 0.3s, transform 0.3s; } .container:not(.last):hover { box-shadow: 0 0 25px rgba(0, 0, 0, 0.5); } .container:hover ~ .image-container { opacity: .25; } .center-container { height: 6rem; width: 6rem; z-index: 11; background-color: #222; } .center-container:focus { height: .1px; width: .1px; pointer-events: none; } .center-container:focus ~ .container { transform: translateY(-50%) translateX(-50%) rotate(120deg) scale(0.5); pointer-events: none; opacity: 0 !important; } .bg { position: absolute; width: 100vw; height: 100vh; z-index: -1; opacity: 1; transition: opacity 0.3s, background 0.3s; background-image: url("//repo.bfw.wiki/bfwrepo/image/5d6539613d08b.png"); background-size: 100vw 100vh; background-position: center center; } .image-container:nth-of-type(1) { z-index: 9; height: 9rem; width: 9rem; background-image: url("//repo.bfw.wiki/bfwrepo/image/5d653a3d2a1fe.png"); opacity: 1; } .image-container:nth-of-type(1):hover { height: 10rem; width: 10rem; } .image-container:nth-of-type(1):hover ~ .bg { background-image: url("//repo.bfw.wiki/bfwrepo/image/5d653a6a2aea8.png"); opacity: 1; } .image-container:nth-of-type(2) { z-index: 8; height: 12rem; width: 12rem; background-image: url("//repo.bfw.wiki/bfwrepo/image/5d65ea7d8bc8b.png"); opacity: 1; } .image-container:nth-of-type(2):hover { height: 13rem; width: 13rem; } .image.........完整代码请登录后点击上方下载按钮下载查看
网友评论0