运行效果:
代码:
body{
/*background-color: #333;*/
}
:root {
--swiper-navigation-size: 44px;
}
* {
padding: 0;
margin: 0;
/* border:1px solid red; */
}
#logo{
float: left;
width: 30%;
}
.nav-bottom{
width: 1000px;
}
.nav {
width: 100%;
height: 100px;
background: #3D3BB8;
/*border: 1px solid red;*/
}
.nav-container{
width: 80%;
height: 100px;
margin: auto;
/*border: 1px solid black;*/
}
.nav-content{
float: left;
width:69.5%;
height: 100px;
/*border: 1px solid yellow;*/
}
.nav-top>form>input{
margin-top: 5px;
float: right;
height: 30px;
}
.nav-top{
border-color: 1px solid red;
height:50px;
line-height: 50px;
vertical-align: middle;
}
.nav-bottom>div>a:first-child:hover{
opacity:0.7;
}
.nav-bottom>div>.menu>li>a:hover{
color: #007aff;
}
.drop_down>li>a:hover{
color: #007aff;
}
.nav-bottom >div{
float: left;
color: white;
height: 50px;
width:78px;
/* width: 10%; */
margin-right: 1.1%;
font-size: 13px;
line-height: 50px;
opacity:1;
}
.nav-bottom>div:hover>.menu{
position: relative;
display: block;
opacity:1;
}
#drop>li:hover>.drop_down{
display: block;
position: relative;
}
.nav-top >div >input{
letter-spacing: normal;
color: fieldtext;
text-transform: none;
border-image: initial;
}
.banner_content{
width: 100%;
}
ul, li{
margin: 0;
padding: 0;
list-style: none;
}
a {
text-decoration: none;
color: white;
}
.menu>li>a{
color: black;
}
.menu{
background-color: white;
position: absolute;
display: none;
top: 0px;
}
.nav-bottom>div{
text-align: center;
/*border-bottom: 1px dashed #3d3bb8;*/
line-height: 40px;
}
.drop_down>li>a{
color: black;
}
#drop>li{
height: 40px;
width: 78px;
}
.drop_down{
background-color: white;
position: absolute;
display: none;
width: 110px;
left: 78px;
top: -40px;
}
.img{
width: 100%;
margin-top: -11px;
border-color: 1px solid red;
object-fit: cover;
}