web前端全系列 教程
1839个小节阅读:2244.1k
鸿蒙应用开发
C语言快速入门
JAVA全系列 教程
面向对象的程序设计语言
Python全系列 教程
Python3.x版本,未来主流的版本
人工智能 教程
顺势而为,AI创新未来
大厂算法 教程
算法,程序员自我提升必经之路
C++ 教程
一门通用计算机编程语言
微服务 教程
目前业界流行的框架组合
web前端全系列 教程
通向WEB技术世界的钥匙
大数据全系列 教程
站在云端操控万千数据
AIGC全能工具班
A A
White Night
xxxxxxxxxx
<div class="nav">
<div class="wrap">
<div class="logo"></div>
<div class="search">
<form action="">
<input class="text-input" type="text" placeholder="查找课程..." >
<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 class="btn">
<i class="iconfont"></i>
</div>
</div>
</div>
xxxxxxxxxx
/* pc端 */
@media screen and (min-width: 992px){
.logo{
width: 25%;
background: url("./images/Brand.png") no-repeat left;
background-size: 183px;
}
.search{
width: 40%;
position: relative;
}
.nav-bar{
width: 35%;
}
.btn{
display: none;
}
}
/*pad端*/
@media screen and (max-width: 992px) and (min-width: 768px) {
.logo{
width: 18%;
background: url("../images/Brand-M.png") no-repeat left;
background-size: 86px;
}
.search{
width: 42%;
position: relative;
}
.nav-bar{
width: 40%;
}
.btn{
display: none;
}
}
/* 移动端 */
@media screen and (max-width: 768px) {
.logo{
width: 16%;
background: url("../images/Brand-S.png") no-repeat left;
background-size: 38px;
}
.search{
width: 68%;
position: relative;
}
.nav-bar{
display: none;
}
.btn{
width: 43px;
height: 43px;
border: 1px solid #fff;
font-size: 20px;
font-weight: 700;
line-height: 43px;
float: right;
color: #fff;
margin-top: 10.5px;
}
}