web前端全系列 教程
1839个小节阅读:2244.1k
鸿蒙应用开发
C语言快速入门
JAVA全系列 教程
面向对象的程序设计语言
Python全系列 教程
Python3.x版本,未来主流的版本
人工智能 教程
顺势而为,AI创新未来
大厂算法 教程
算法,程序员自我提升必经之路
C++ 教程
一门通用计算机编程语言
微服务 教程
目前业界流行的框架组合
web前端全系列 教程
通向WEB技术世界的钥匙
大数据全系列 教程
站在云端操控万千数据
AIGC全能工具班
A A
White Night
<div class="nav">
<div class="wrap">
<div class="logo"></div>
<div class="search">
<form action="">
<input type="text" placeholder="查找课程..." class="text-input">
<button class="iconfont"></button>
</form>
</div>
<div class="nav-bar">
<ul>
<li><a href="#" class="nav-bar-active">首页</a></li>
<li><a href="#">课程</a></li>
<li><a href="#">公告</a></li>
<li><a href="#">登录</a></li>
</ul>
</div>
</div>
</div>
x.nav{
width: 100%;
height: 66px;
background-color: #88c5e1;
border-bottom: 5px solid #54abd4;
position: fixed;
top: 0;
left: 0;
z-index: 999;
}
.wrap{
width: 87%;
margin: 0 auto;
}
.logo{
width: 25%;
background: url("./images/Brand.png") no-repeat left;
background-size: 183px;
}
.search{
width: 40%;
position: relative;
}
.nav-bar{
width: 35%;
}
.logo,.search,.nav-bar{
height: 66px;
float: left;
}
.text-input{
width: 100%;
height: 40px;
background-color: #f5f5f5;
border: 1px solid #f5f5f5;
box-sizing: border-box;
border-radius: 2px;
outline: none;
margin-top: 13px;
padding-left: 10px;
transition: all .2s;
}
.search button{
width: 40px;
height: 34px;
background-color: #f5f5f5;
color: #54abd4;
font-weight: 900;
position: absolute;
right: 2px;
top: 16px;
}
.text-input:hover{
background-color: #fff;
border-color: #54abd4;
}
.nav-bar>ul{
float: right;
}
.nav-bar li{
float: left;
}
.nav-bar a{
color: #fff;
padding: 10px;
display: block;
margin-left: 8px;
margin-top: 12.5px;
}
.nav-bar-active{
border-bottom: 2px solid #fff;
}
.nav-bar a:hover{
border-bottom: 2px solid #fff;
}