css实现三维立体方块柱体菜单悬浮抽出动画效果代码

代码语言:html

所属分类:菜单导航

代码描述:css实现三维立体方块柱体菜单悬浮抽出动画效果代码

代码标签: css 三维 立体 方块 柱体 菜单 悬浮 抽出 动画

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


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

<head>

  <meta charset="UTF-8">
  

  
<style>
@import url("https://fonts.googleapis.com/css?family=Oswald:400,700");
* {
  margin: 0;
  padding: 0;
  font-family: "Oswald", sans-serif;
  box-sizing: border-box;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #434750;
}

ul {
  position: relative;
  transform: skewY(-15deg);
}

ul li {
  position: relative;
  list-style: none;
  width: 200px;
  background-color: #3e3f46;
  padding: 15px;
  z-index: var(--i);
  transition: 0.5s;
}

ul li:hover {
  background: #33a3ee;
  transform: translateX(-50px);
}

ul li::before {
  content: "";
  position: absolute;
  top: 0;
  left: -40px;
  width: 40px;
  height: 100%;
  background-color: #2e3133;
  transform-origin: right;
  transform: skewy(45deg);
  transition: 0.5s;
}

ul li:hover::before {
  background: #1f5378;
}

ul li::after {
  content: "";
  position: absolute;
  top: -40px;
  left: 0;
  wid.........完整代码请登录后点击上方下载按钮下载查看

网友评论0