css实现楼梯石阶悬浮变形视觉效果代码

代码语言:html

所属分类:悬停

代码描述:css实现楼梯石阶悬浮变形视觉效果代码

代码标签: css 楼梯 石阶 悬浮 变形 视觉

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  

  
<style>
*, *::before, *::after {
  padding: 0;
  margin: 0 auto;
  box-sizing: border-box;
}

body {
  background-color: #444;
  min-height: 100vh;
  display: grid;
  place-items: center;
  perspective: 1200px;
}

.steps {
  position: relative;
  transform: translateY(100px);
  transform-style: preserve-3d;
  transition: transform 1s;
  --door: maroon;
  --dark: #222;
  --stepTop: #ddd;
  --stepSide: #777;
}
.steps::before, .steps::after {
  content: "";
  position: absolute;
  width: 480px;
  left: -240px;
  background-repeat: no-repeat;
  transition: inherit;
}
.steps::before {
  bottom: 0;
  height: 400px;
  background-image: conic-gradient(at 80px 160px, var(--stepSide) 0 135deg, var(--stepTop) 0 270deg, var(--door) 0), linear-gradient(45deg, var(--dark) 0 28px, var(--stepTop) 0 113px, transparent 0), linear-gradient(to right, var(--dark) 0 40px, var(--stepSide) 0 160px), linear-gradient(45deg, var(--dark) 0 57px, var(--stepTop) 0 141px, transparent 0), linear-gradient(to right, var(--dark) 0 80px, var(--stepSide) 0 200px), linear-gradient(45deg, var(--dark) 0 85px, var(--stepTop) 0 170px, transparent 0), linear-gradient(-45deg, var(--dark), transparen.........完整代码请登录后点击上方下载按钮下载查看

网友评论0