css实现鼠标悬浮三维卡片倾斜效果代码
代码语言:html
所属分类:悬停
代码描述:css实现鼠标悬浮三维卡片倾斜效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> @import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;400;500&family=Pacifico&display=swap"); html, body { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background-color: #f2f2f2; } #frame { width: 300px; height: 450px; transition: transform 200ms; } #frame:hover { transform: scale3d(1.05, 1.05, 1.05); } #card { width: 100%; height: 100%; border-radius: 9px; background-image: url("https://djjjk9bjm164h.cloudfront.net/background3.jpg"); background-position: center; background-size: cover; background-repeat: no-repeat; box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.1); position: relative; transition-duration: 250ms; transition-property: transform, box-shadow; transition-timing-function: ease-out; } #light { position: absolute; width: 100%; height: 100%; border-radius: 9px; } /* css for my tutorial channel link */ #tube { position: absolute; bottom: 1vw; right: 1vw; opacity: 0.4; } #tube > img { height: 3rem; } #tube:hover { opacity: 1; } </style> </head> <body> <div id="frame"> <div id="card"> .........完整代码请登录后点击上方下载按钮下载查看
网友评论0