jquery实现立体视觉滚动差异按钮效果代码
代码语言:html
所属分类:视觉差异
代码描述:jquery实现立体视觉滚动差异按钮效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <style> /* button variables */ html { height: 100%; overflow: hidden; background: #777; } /* the perspective set here is the most important declaration for the 3d look of the buttons (values over 1000px make the buttons look almost flat) */ body { margin: 0; height: 100%; overflow-y: scroll; font-family: sans-serif; font-size: 16px; perspective: 350px; } div { width: 600px; margin: 0 auto; padding: 20px 20px 600px; background: #fff; transform-style: preserve-3d; } h1, h2 { text-align: center; } h1, h2, hr { position: relative; background: #444; color: #fff; line-height: 2em; margin-left: -50px; margin-right: -50px; transform-style: preserve-3d; transform: translateZ(1px); } h1::before, h1::after, h2::before, h2::after, hr::before, hr::after { content: ""; position: absolute; top: 0; width: 50px; height: 100%; background: #2b2b2b; } h1::before, h2::before, hr::before { left: -50px; transform-origin: 100% 0%; transform: rotateY(-130deg); } h1::after, h2::after, hr::af.........完整代码请登录后点击上方下载按钮下载查看
网友评论0