css卡片悬浮抽出动画效果代码
代码语言:html
所属分类:悬停
代码描述:css卡片悬浮抽出动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!doctype html> <html> <head> <meta charset="utf-8"> <style> html, body { height: 100%; } body { background-color: #272727; display: grid; font-family: Avenir, sans-serif; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; -moz-osx-font-smoothing: grayscale; -moz-font-smoothing: antialiased; -webkit-font-smoothing: antialiased; font-smoothing: antialiased; } .tariffCards { position: absolute; top: 50%; left: 50%; margin: -180px 0 0 -140px; user-select: none; transform: translate3d(0, 0, 0); transform-style: preserve-3d; } .tariffCards:after { position: absolute; bottom: -27px; left: 5%; content: ""; width: 65%; height: 10px; border-radius: 100%; background-image: radial-gradient(rgba(34, 50, 84, 0.04), rgba(34, 50, 84, 0)); } .tariffCards > div { position: relative; width: 280px; height: 140px; border-radius: 12px; color: white; transform: rotateX(45deg) rotateY(-15deg) rotate(45deg); transition: all 0.4s ease; overflow: hidden; cursor: pointer; } .tariffCards > div:after { position: absolute; top: -70px; left: 0; content: ""; width: 200%; height: 200%; background-image: linear-gradient(60deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 80%); transform: translateX(-100%); } .tariffCards > div img { margin-top: 15px; pointer-events: none; } .tariffCards > div h3 { position: absolute; bottom: 28px; left: 15px; font-size: 18px; font-weight: 800; } .tariffCards > div span { position: absolute; font-weight: 700; bottom: 15px; left: 15px; font-size: 12px; font-weight: 600; opacity: 0.8; } .tariffCards > div.economy { margin-top: 0; z-index: 3; background-color: #8063E1; background-image: linear-gradient(135deg, #BD7BE8, #8063E1); box-shadow: 20px 20px 60px rgba(34, 50, 84, 0.5), 1px 1px 0px 1px #8063E1; } .tariffCards &.........完整代码请登录后点击上方下载按钮下载查看
网友评论0