多个div层叠实现三维透视文字效果
代码语言:html
所属分类:三维
代码描述:多个div层叠实现三维透视文字效果,跟随鼠标运动
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> body { height: 100vh; display: -webkit-box; display: flex; -webkit-box-pack: center; justify-content: center; -webkit-box-align: center; align-items: center; overflow: hidden; background-color: #141414; } .wrap { position: relative; -webkit-perspective: 100px; perspective: 100px; text-transform: uppercase; } .text { position: absolute; top: 0; left: 0; color: #191919; font-size: 10vw; font-weight: bold; text-shadow: -1px -1px 0 #f0f0f0, 1px -1px 0 #f0f0f0, -1px 1px 0 #f0f0f0, 1px 1px 0 #f0f0f0; -webkit-transform-style: preserve-3d; transform-style: preserve-3d; } .text:first-child { position: relative; } </style> </head> <body translate="no"> <div class="wrap"> <div class="text">Perspective</div> <div class="text">Perspective</div> <div class="text".........完整代码请登录后点击上方下载按钮下载查看
网友评论0