卡片模糊悬浮交互效果
代码语言:html
所属分类:悬停
代码描述:卡片模糊悬浮交互效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> * { margin: 0; padding: 0; box-sizing: border-box; } html, body { height: 100vh; background: #666666; font-family: 'Open Sans', sans-serif; } body { display: flex; justify-content: center; align-items: center; } .card { position: relative; display: flex; align-items: center; justify-content: center; flex-direction: column; height: 400px; width: 400px; border-radius: 25px; background-color: #ffffff; box-shadow: 10px 0 50px rgba(0, 0, 0, 0.5); overflow: hidden; } .card:nth-child(1) { margin-right: 30px; } body:hover .card { filter: blur(15px); transform: scale(0.9); opactiy: 0.5; transition: 0.9s; } body .card:hover { filter: blur(0); transform: scale(1.1); opactiy: 1; transition: 0.9s; } h2 { position: absolute; left: 0; top: 0; margin: 20px 0 0 20px; font-size: 44px; font-weight: 600; text-transform: uppercase; letter-spacing: 15px; color: #ffffff; mix-blend-mode: difference; } p { position: absolute; left: 0; bottom: 0; margin: 0 20px 60px 20px; font-size: 18px; color: #ffffff; mix-blend-mode: difference; } #circle { height: 100%; width:.........完整代码请登录后点击上方下载按钮下载查看
网友评论0