css实现红墙背景相册点击图片放大轮换效果代码
代码语言:html
所属分类:图片放大
代码描述:css实现红墙背景相册点击图片放大轮换效果代码
代码标签: css 红墙 背景 相册 点击 图片 放大 轮换
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link rel="stylesheet" href="https://kit.fontawesome.com/0786c5feec.css" crossorigin="anonymous"> <style> html, body { height: 100%; min-height: 100%; margin: 0; } body { display: flex; align-items: center; justify-content: center; background-image: url(//repo.bfw.wiki/bfwrepo/image/643bc76d00c94.png); background-size: cover; } .thumbs { display: flex; justify-content: center; flex-wrap: wrap; width: 500px; max-width: 100%; } .thumbs > a { flex: 0 0 auto; max-width: 150px; height: 150px; margin: 10px; overflow: hidden; display: flex; justify-content: center; border-radius: 5px; box-shadow: 0 0 0 3px white, 0 5px 8px 3px rgba(0, 0, 0, 0.6); } .thumbs > a img { transform: scale(1); transition: transform 0.1s ease-in-out; filter: grayscale(50%); } .thumbs > a:hover img { transform: scale(1.1); filter: grayscale(0%); } .lightbox { position: fixed; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); height: 100%; width: 100%; left: 0; top: 0; transform: translateY(-100%); opacity: 0; transition: opacity 0.5s ease-in-out; } .lightbox:has(div:target) { transform: translateY(0%); opacity: 1; } .lightbox a.nav { text-decoration: none; color: white; font-size: 40px; text-shadow: 0 2px 2px rgba(0, 0, 0, 0.8); o.........完整代码请登录后点击上方下载按钮下载查看
网友评论0