css布局实现一张visa信用卡效果代码
代码语言:html
所属分类:布局界面
代码描述:css布局实现一张visa信用卡效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> :root { font-size: 24px; } body { background: #1488cc; /* fallback for old browsers */ background: linear-gradient(to left, #283593, #1976d2); height: 100vh; font-family: "Josefin Sans", sans-serif; } /* Background circles start */ .circle { position: absolute; border-radius: 50%; background: radial-gradient(#006db3, #29b6f6); } .circles { position: absolute; height: 270px; width: 450px; top: 50%; left: 50%; transform: translate(-50%, -50%); } .circle-1 { height: 180px; width: 180px; top: -50px; left: -60px; } .circle-2 { height: 200px; width: 200px; bottom: -90px; right: -90px; opacity: 0.8; } /* Background circles end */ .card-group { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .card { position: relative; height: 270px; width: 450px; border-radius: 25px; background: rgba(255, 255, 255, 0.2); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); border: 2px solid rgba(255, 255, 255, 0.1); box-shadow: 0 0 80px rgba(0, 0, 0, 0.2); overflow: hidden; } .logo img, .chip img, .number, .name, .from, .to, .ring { position: absolute; /* All items inside card should have absolute position */ } .logo img { top: 35px; right: 40px; width: 80px; height: auto; opacity: 0.8; } .chip img { top: 120px; left: 40px; width: 50px; height: auto; opacity: 0.8; } .number, .name, .from, .to { color: rgba(255, 255, 255, 0.8); font-weight: 400; letter-spacing: 2px; text-shadow: 0 0 2px rgba(0, 0, 0, 0.6); } .number { left: 40px; bottom: 65px; font-family: "Nunito", sans-serif; } .name { font-size: 0.5rem.........完整代码请登录后点击上方下载按钮下载查看
网友评论0