Line 1: | Line 1: | ||
+ | /* 用于导航栏的格式要求 */ | ||
+ | *{margin:0;padding:0;list-style-type:none;} | ||
ul.drop{ | ul.drop{ | ||
padding-left:0; | padding-left:0; | ||
Line 5: | Line 7: | ||
ul { | ul { | ||
list-style-type: none; | list-style-type: none; | ||
+ | } | ||
+ | .nav_logo_pic{ | ||
+ | width:20px; | ||
+ | height: 20px; | ||
+ | margin-top: 15px; | ||
+ | float:left; | ||
+ | margin-left: 30px; | ||
+ | |||
+ | } | ||
+ | .nav_logo_pic img{ | ||
+ | max-width: 100%; | ||
+ | height: auto; | ||
} | } | ||
.nav { | .nav { | ||
− | background: | + | background: #ffffff; |
− | + | color: #4e72b8; | |
− | + | ||
− | + | ||
width:100%; | width:100%; | ||
− | height: | + | height: 52px; |
margin: 0px ; | margin: 0px ; | ||
padding:0px; | padding:0px; | ||
Line 18: | Line 30: | ||
top:0px; | top:0px; | ||
text-align: center; | text-align: center; | ||
+ | background-size: cover; | ||
+ | font-family: "Microsoft YaHei", "Raleway", sans-serif; | ||
+ | letter-spacing: 0px; | ||
+ | z-index:100; | ||
+ | } | ||
+ | .logo{ | ||
+ | position: fixed; | ||
+ | margin-left: 20px; | ||
+ | margin-top: 5px; | ||
+ | width: 80px; | ||
+ | height: 40px; | ||
+ | z-index: 101; | ||
+ | } | ||
+ | .logo_picture{ | ||
+ | max-width: 100%; | ||
+ | height: auto; | ||
} | } | ||
.main { | .main { | ||
Line 24: | Line 52: | ||
} | } | ||
.main > li { | .main > li { | ||
− | + | width: 13%; | |
− | width: | + | |
} | } | ||
.main > li a{ | .main > li a{ | ||
border-left:0px solid rgba(23, 23, 50, 1); | border-left:0px solid rgba(23, 23, 50, 1); | ||
+ | |||
} | } | ||
− | a { | + | .nav a { |
text-decoration: none; | text-decoration: none; | ||
− | color: # | + | color: #4e72b8; |
text-transform: capitalize; | text-transform: capitalize; | ||
font-family: monospace; | font-family: monospace; | ||
display: block; | display: block; | ||
− | padding: | + | padding: 16px 15px; |
− | + | ||
font-size: 15px; | font-size: 15px; | ||
− | font-family: "Raleway", sans-serif; | + | font-weight: bold; |
+ | font-family: "Microsoft YaHei","Raleway", sans-serif; | ||
} | } | ||
− | a:hover { | + | .nav a:hover { |
− | background | + | background:#eee; |
} | } | ||
.drop li { | .drop li { | ||
Line 50: | Line 79: | ||
.drop li a { | .drop li a { | ||
− | background-color: | + | background-color: #ffffff; |
padding: 10px 0; | padding: 10px 0; | ||
} | } | ||
+ | .nav ul li ul{ | ||
+ | display: none; | ||
+ | } | ||
+ | .nav ul li:hover ul{ | ||
+ | display: block; | ||
+ | } | ||
+ | .nav ul li ul li:hover{ | ||
+ | background-color:#b33636; | ||
+ | } | ||
/*------------- menu1 animation---------------*/ | /*------------- menu1 animation---------------*/ | ||
Line 71: | Line 109: | ||
} | } | ||
.main li:hover .menu1 li:nth-of-type(4) { | .main li:hover .menu1 li:nth-of-type(4) { | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
animation: menu1 0s ease-in-out forwards; | animation: menu1 0s ease-in-out forwards; | ||
animation-delay: 0s; | animation-delay: 0s; | ||
Line 119: | Line 141: | ||
.main li:hover .menu2 li:nth-of-type(3) { | .main li:hover .menu2 li:nth-of-type(3) { | ||
− | |||
− | |||
− | |||
− | |||
animation: menu2 0s ease-in-out forwards; | animation: menu2 0s ease-in-out forwards; | ||
animation-delay: 0s; | animation-delay: 0s; | ||
Line 194: | Line 212: | ||
animation-delay: 0s; | animation-delay: 0s; | ||
} | } | ||
− | + | .main li:hover .menu5 li:nth-of-type(2) { | |
+ | animation: menu5 0s ease-in-out forwards; | ||
+ | animation-delay: 0s; | ||
+ | } | ||
.main li:hover .menu5 li:last-of-type { | .main li:hover .menu5 li:last-of-type { | ||
animation: menu5 0s ease-in-out forwards; | animation: menu5 0s ease-in-out forwards; | ||
Line 238: | Line 259: | ||
transform: rotateX(0); | transform: rotateX(0); | ||
} | } | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } |
Latest revision as of 13:14, 12 October 2018
/* 用于导航栏的格式要求 */
- {margin:0;padding:0;list-style-type:none;}
ul.drop{
padding-left:0;
} ul {
list-style-type: none;
} .nav_logo_pic{
width:20px; height: 20px; margin-top: 15px; float:left; margin-left: 30px;
} .nav_logo_pic img{
max-width: 100%; height: auto;
} .nav {
background: #ffffff; color: #4e72b8; width:100%; height: 52px; margin: 0px ; padding:0px; position: fixed; top:0px; text-align: center; background-size: cover; font-family: "Microsoft YaHei", "Raleway", sans-serif; letter-spacing: 0px; z-index:100;
} .logo{
position: fixed; margin-left: 20px; margin-top: 5px; width: 80px; height: 40px; z-index: 101;
} .logo_picture{
max-width: 100%; height: auto;
} .main {
display: flex; justify-content: space-around;
} .main > li {
width: 13%;
} .main > li a{
border-left:0px solid rgba(23, 23, 50, 1);
} .nav a {
text-decoration: none; color: #4e72b8; text-transform: capitalize; font-family: monospace; display: block; padding: 16px 15px; font-size: 15px; font-weight: bold; font-family: "Microsoft YaHei","Raleway", sans-serif;
} .nav a:hover {
background:#eee;
} .drop li {
opacity: 0; transform-origin: top center;
} .drop li a {
background-color: #ffffff;
padding: 10px 0;
} .nav ul li ul{
display: none; }
.nav ul li:hover ul{
display: block; }
.nav ul li ul li:hover{
background-color:#b33636; }
/*------------- menu1 animation---------------*/ .main li:hover .menu1 li:first-of-type {
animation: menu1 0s ease-in-out forwards; animation-delay: 0s;
}
.main li:hover .menu1 li:nth-of-type(2) {
animation: menu1 0s ease-in-out forwards; animation-delay: 0s;
}
.main li:hover .menu1 li:nth-of-type(3) {
animation: menu1 0s ease-in-out forwards; animation-delay: 0s;
} .main li:hover .menu1 li:nth-of-type(4) {
animation: menu1 0s ease-in-out forwards; animation-delay: 0s;
}
.main li:hover .menu1 li:last-of-type {
animation: menu1 0s ease-in-out forwards; animation-delay: 0s;
}
@keyframes menu1 {
from { opacity: 0; transform: translateX(30px) rotateY(90deg); } to { opacity: 1; transform: translateX(0) rotateY(0); }
} /*------------- menu2 animation -------------------*/
.main li:hover .menu2 li:first-of-type {
animation: menu2 0s ease-in-out forwards; animation-delay: 0s;
}
.main li:hover .menu2 li:nth-of-type(2) {
animation: menu2 0s ease-in-out forwards; animation-delay: 0s;
}
.main li:hover .menu2 li:nth-of-type(3) {
animation: menu2 0s ease-in-out forwards; animation-delay: 0s;
}
.main li:hover .menu2 li:last-of-type {
animation: menu2 0s ease-in-out forwards; animation-delay: 0s;
}
@keyframes menu2 {
0% { opacity: 0; transform: scale(0.7); } 50% { opacity: 0.5; transform: scale(1.1); } 100% { opacity: 1; transform: scale(1); }
}
/*------------- menu3 animation -------------------*/
.main li:hover .menu3 li:first-of-type {
animation: menu3 0s ease-in-out forwards; animation-delay: 0s;
}
.main li:hover .menu3 li:nth-of-type(2) {
animation: menu3 0s ease-in-out forwards; animation-delay: 0s;
}
.main li:hover .menu3 li:nth-of-type(3) {
animation: menu3 0s ease-in-out forwards; animation-delay: 0s;
} .main li:hover .menu3 li:nth-of-type(4) {
animation: menu3 0s ease-in-out forwards; animation-delay: 0s;
} .main li:hover .menu3 li:nth-of-type(5) {
animation: menu3 0s ease-in-out forwards; animation-delay: 0s;
} .main li:hover .menu3 li:last-of-type {
animation: menu3 0s ease-in-out forwards; animation-delay: 0s;
}
@keyframes menu3 {
0% { opacity: 0; transform: translateX(20px); } 100% { opacity: 1; transform: translateX(0); }
}
/*------------- menu4 animation :None--------------*/ /*------------- menu5 animation -------------------*/
.main li:hover .menu5 li:first-of-type {
animation: menu5 0s ease-in-out forwards; animation-delay: 0s;
} .main li:hover .menu5 li:nth-of-type(2) {
animation: menu5 0s ease-in-out forwards; animation-delay: 0s;
} .main li:hover .menu5 li:last-of-type {
animation: menu5 0s ease-in-out forwards; animation-delay: 0s;
}
@keyframes menu5 {
0% { opacity: 0; transform: translateX(50px) rotate(-90deg); } 100% { opacity: 1; transform: translateX(0) rotate(0); }
}
/*------------- menu6 animation:None-------------------*/ /*------------- menu7 animation------------------------*/ .main li:hover .menu7 li:first-of-type {
animation: menu7 0s ease-in-out forwards; animation-delay: 0s;
}
.main li:hover .menu7 li:nth-of-type(2) {
animation: menu7 0s ease-in-out forwards; animation-delay: 0s;
}
.main li:hover .menu7 li:last-of-type {
animation: menu7 0s ease-in-out forwards; animation-delay: 0s;
}
@keyframes menu7 {
0% { opacity: 0; transform: rotateX(-90deg); } 100% { opacity: 1; transform: rotateX(0); }
}