select选择动画特效

代码语言:html

所属分类:表单美化

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


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

<title> - Small menu</title>
<style>
    html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: #fbfbfb;
  font-family: "Helvetica Neue", sans-serif;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  color: #333;
}
* {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
@-webkit-keyframes next {
  50%,
  55% {
    -webkit-transform: translateY(52px);
    transform: translateY(52px);
  }
  to {
    -webkit-transform: translateY(50px);
    transform: translateY(50px);
  }
}
@keyframes next {
  50%,
  55% {
    -webkit-transform: translateY(52px);
    transform: translateY(52px);
  }
  to {
    -webkit-transform: translateY(50px);
    transform: translateY(50px);
  }
}
@-webkit-keyframes next-wrapper {
  50% {
    -webkit-transform: translateY(3px);
    transform: translateY(3px);
  }
}
@keyframes next-wrapper {
  50% {
    -webkit-transform: translateY(3px);
    transform: translateY(3px);
  }
}
#menu {
  height: 50px;
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
  padding: 16px;
  -webkit-box-shadow: 0 7px 15px 0 rgba(214, 214, 214, 0.35);
  box-shadow: 0 7px 15px 0 rgba(214, 214, 214, 0.35);
  overflow: hidden;
  font-weight: 500;
  border-radius: 5px;
  background: white;
  line-height: 1;
}
#menu #menu-main {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}
#menu #menu-main #current-option {
  position: relative;
}
#menu #menu-main #current-option::before {
  content: attr(data-next);
  position: absolute;
  top: -50px;
}
#menu #menu-main #next-option {
  width: 12px;
  height: 10px;
  border: none;
  padding: 0;
  display: block;
  cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px.........完整代码请登录后点击上方下载按钮下载查看

网友评论0