下拉菜单动画效果

代码语言:html

所属分类:菜单导航

代码描述:下拉菜单动画效果

代码标签:

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


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=Lato:wght@700&amp;display=swap'>
<style>
.dropdown {
  position: relative;
  width: 230px;
  filter: url(#goo);
}
.dropdown__face, .dropdown__items {
  background-color: #fff;
  padding: 20px;
  border-radius: 25px;
}
.dropdown__face {
  display: block;
  position: relative;
}
.dropdown__items {
  margin: 0;
  position: absolute;
  right: 0;
  top: 50%;
  width: 100%;
  list-style: none;
  list-style-type: none;
  display: flex;
  justify-content: space-between;
  visibility: hidden;
  z-index: -1;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.93, 0.88, 0.1, 0.8);
}
.dropdown__items::before {
  content: "";
  background-color: #fff;
  position: absolute;
  bottom: 100%;
  right: 20%;
  height: 40px;
  width: 20px;
}
.dropdown__arrow {
  border-bottom: 2px solid #000;
  border-right: 2px solid #000;
  position: absolute;
  top: 50%;
  right: 30px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg) translateY(-50%);
  transform-origin: right;
}
.dropdown input {
  display: none;
}
.dropdown input:checked ~ .dropdown__items {
  top: calc(100% + .........完整代码请登录后点击上方下载按钮下载查看

网友评论0