css菜单点击伸缩动画效果代码

代码语言:html

所属分类:菜单导航

代码描述:css菜单点击伸缩动画效果代码

代码标签: 伸缩 动画 效果

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

<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
<style>
body{background: #494A5F;	font-family: "Microsoft YaHei","Segoe UI", "Lucida Grande", Helvetica, Arial,sans-serif;}

.menu {
  display: block;
  box-sizing: border-box;
  background: white;
  height: 87.75px;
  width: 87.75px;
  padding: 36px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  margin: 30px auto;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
  transition: 1.3s cubic-bezier(0.53, 0, 0.15, 1.3);
}
.menu.expanded {
  width: 420px;
}

span.item {
  padding: 9px;
  white-space: nowrap;
  visibility: visible;
  opacity: 1;
  transition: .3s;
  transform: rotateY(0deg);
}
span.item:nth-of-type(1) {
  transition-delay: .4s;
}
span.item:nth-of-type(2) {
  transition-delay: .5s;
}
span.item:nth-of-type(3) {
  transition-delay: .6s;
}
span.item:nth-of-type(4) {
  transition-delay: .7s;
}
span.hidden {
  width: 0;
  visibility: hidden;
  opacity: 0;
  transform: rotateY(90deg);
}
span.hidden:nth-of-type(1) {
  transition-delay: .3s;
}
span.hidden:nth-of-type(2) {
  transition-delay: .2s;
}
span.hidden:nth-of-type(3) {
  transition-delay: .1s;
}
span.hidden:nth-of-type(4) {
  transition-delay: 0s;
}
span.item a {
  color: black;
  text-decoration: none;
  font-size: 16.36364px;
  transition: .3s;
}
span.item a:hover {
  color: #1D90F5;
}

.container {
  position: absolute;
  top: 22.5px;
  right: calc(100% - 73.125px);
  height: 42.75px;
  width: 58.5px;
  transition: 1s;
}
.container.cl.........完整代码请登录后点击上方下载按钮下载查看

网友评论0