jquery实现三维3d卡片悬浮交互倾斜阴影效果代码
代码语言:html
所属分类:悬停
代码描述:jquery实现三维3d卡片悬浮交互倾斜阴影效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> body { margin: 0; background-color: #eee; background-image: url("//repo.bfw.wiki/bfwrepo/image/605ef1c989562.png"); background-repeat: no-repeat; background-position: center; background-size: cover; height: 100vh; overflow: hidden; } .overlay { background-color: rgba(255, 255, 255, 0.4); width: 100vw; height: 100vh; } .card { backdrop-filter: blur(5px); width: 35vh; height: 55vh; background-color: rgba(0, 166, 255, 0.3); position: absolute; left: calc(50vw - calc(35vh / 2)); top: calc(50vh - calc(55vh / 2)); transform: scale(1); box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.051), 0px 0px 7.2px rgba(0, 0, 0, 0.073), 0px 0px 13.6px rgba(0, 0, 0, 0.09), 0px 0px 24.3px rgba(0, 0, 0, 0.107), 0px 0px 45.5px rgba(0, 0, 0, 0.129), 0px 0px 109px rgba(0, 0, 0, 0.18); } .glare-container { width: 100%; height: 100%; overflow: hidden; position: relative; } .glare { position: absolute; left: 100%; bottom: -50%; width: 150%; height: 150%; background: rgb(255, 255, 255); background: linear-gradient( 90deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 20% ); transform: rotateZ(35deg); pointer-events: none; filter: blur(4px); } .card-1 { left: calc(80vw - calc(35vh / 2)); background-color: rgba(255, 59, 0, 0.37); } .card-2 { left: calc(20vw - calc(35vh / 2)); background-color: rgba(255, 0, 0, 0.23); } </style> </head> <body> <div class="overlay"> </div> <div class="card"> <div class="glare-container"> <div class="glare"> </div> </div> </div> <div class="card card-1"> <div class="glare-container"> <div class="glare"> </div> </div> </div> <div class="card card-2"> <div class="glare-container"> <div class="glare"> </div> </div> </div> <script t.........完整代码请登录后点击上方下载按钮下载查看
网友评论0