当前位置:网站首页>综合设计一个OPPE主页--顶部,头部的设计
综合设计一个OPPE主页--顶部,头部的设计
2022-07-26 15:59:00 【(-^_^-)】
顶部:

头部:查看要求--观察页面头部是上下分还是左右分,明显是左右分
左边分为3小部分 右边分5小部分
查看图片的大小 和偏移量:


鼠标放上去显示绿色
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="css/style.css">
<title>OPPO</title>
</head>
<body>
<!-- 页面的顶部 -->
<div id="top">
<div class="container"></div>
</div>
<!-- 页面的头部 -->
<div id="header">
<div class="container">
<!-- 左边有三项 -->
<!-- /*实现整体 浮动*/ -->
<div class="header_left left">
<div class="xlwb"></div>
<div class="txwb"></div>
<div class="tel">4001-666-888</div>
</div>
<!-- 右边的相同样式就是文字不同 列表适合一点 有五项-->
<ul class="right">
<li><a href="#">登录</a></li>
<li><a href="#">注册</a></li>
<li><a href="#">积分兑换</a></li>
<li><a href="#">帮助中心</a></li>
<li class="shop_car">
<span></span>
<a href="#">购物车</a>
</li>
</ul>
</div>
</div>
<!-- 页面的导航栏 -->
<div id="nav">
<div class="container"></div>
</div>
<!-- 页面的横幅 -->
<div id="banner">
<div class="container"></div>
</div>
<!-- 页面的明星机型部分 -->
<div id="star">
<div class="container"></div>
</div>
<!-- 页面的精选配件 -->
<div id="accessory">
<div class="container"></div>
</div>
<!-- 页面的搜素opple部分 -->
<div id="world">
<div class="container"></div>
</div>
<!-- 页面的服务部分 -->
<div id="service">
<div class="container"></div>
</div>
<!-- 页面的售后服务 -->
<div id="alter_sale">
<div class="container"></div>
</div>
<!-- 页面的底部 -->
<div id="footer">
<div class="container"></div>
</div>
</body>
</html>
/*初始化样式*/
/*将默认的样式清零*/
*{
padding: 0;
margin: 0;
}
/*清除列表前面的标识 */
ol,ul{
list-style-type: none;
}
/*清除超链接的默认样式*/
a{
color: #666;/*灰色*/
text-decoration: none;/*去除下划线*/
}
/*将左右浮动写在类里面*/
.left{
float: left;
}
.right{
float: right;
}
/*测试部分*/
#top,#header,#nav,#banner,#star,#accessory,#world,#service,#alter_sale,#footer{
height: 100px;
width: 100%;
border: 1px solid #000;
}
/*页面的顶部样式*/
#top{
height: 5px;
background-color: #00925f;
}
/*页面的头部样式*/
#header{
height: 30px;
background-color: #2d2d2d;
}
#header .xlwb{
width: 22px;
height: 19px;
background: url("../img/icons.png") no-repeat -48px -98px; /*偏移量量一下*/
}
#header .txwb{
width: 17px;
height: 24px;
background: url("../img/icons.png") no-repeat -28px -93px; /*偏移量量一下*/
}
#header .tel{
color: #17925f;
font-size: 14px;
}
/*实现一行显示 浮动*/
#header .header_left div{
float: left;
margin:6px 10px 0px;
}
#header ul li{
float: left;
line-height: 30px;
}
#header li a{
color: #b2b2b2;
font-size: 14px;
border-right: 1px solid #b2b2b2;
padding:0px 10px;/*文字与边框的距离*/
}
#header li a:hover{
color: #00925f;
}
#header .shop_car span{
width: 19px;
height: 16px;
margin-left: 10px;
display: inline-block;
/* span是行内元素 无法设置行内宽度 改变显示方式*/
background: url("../img/icons.png") no-repeat 0px -96px;
}
#header .shop_car a{
border: none;
}
.container{
width: 1280px;
border: 1px solid #f00;
margin: 0 auto; /*内容部分居中*/
}边栏推荐
- Google Earth Engine——MERRA-2 M2T1NXAER:1980-2022年气溶胶逐日数据集
- Interface test for quick start of JMeter
- C# 给Word每一页设置不同文字水印
- [physical simulation] the principle and practice of the simplest shape matching
- My brother created his own AI anti procrastination system, and he was "blinded" when playing with his mobile phone | reddit was hot
- PAT甲级 1049 Counting Ones
- Gcc/g++ and dynamic and static libraries and GDB
- 博途PLC顺序开关机功能块(SCL)
- Understanding weight sharing in convolutional neural networks
- 德国emg电动执行器EB800-60II
猜你喜欢

我们被一个 kong 的性能 bug 折腾了一个通宵

Google Earth Engine——MERRA-2 M2T1NXSLV:1980-至今全球压力、温度、风等数据集

博途PLC顺序开关机功能块(SCL)

Operating system migration practice: deploying MySQL database on openeuler

Research and application of the whole configuration of large humanoid robot
![[physical simulation] the principle and practice of the simplest shape matching](/img/1e/d91ed992bc648d90d0c68bfe541d7e.jpg)
[physical simulation] the principle and practice of the simplest shape matching

2022 latest Tibet Construction scaffolder (construction special operation) simulation exam questions and answers

【工具分享】自动生成文件目录结构工具mddir

互联网协议
![API version control [eolink translation]](/img/3a/8a78e57a2474f33d011d91631fde74.jpg)
API version control [eolink translation]
随机推荐
[tool sharing] automatic generation of file directory structure tool mddir
Interface test for quick start of JMeter
Bugku login2
技术风向标 | 云原生技术架构成熟度模型解读
bucher齿轮泵QX81-400R301
综合设计一个OPPE主页--明星机型的设计
parker电磁阀D1VW020DNYPZ5
I would like to ask you guys, how to specify the character set of MySQL CDC tables? I can't find the corresponding connector parameters on the official website. I read one
PAT甲级 1044 Shopping in Mars
Pat grade a 1050 string subtraction
Summary of key knowledge of C language
PAT甲级 1046 Shortest Distance
德国emg电动执行器EB800-60II
[physical simulation] ultra simple shape matching simulates rigid body motion
Analyzing method and proc in Ruby
辨析 Ruby 中的 Method 与 Proc
Sword finger offer special assault edition day 11
We were tossed all night by a Kong performance bug
Research and application of the whole configuration of large humanoid robot
Development daily summary (11): file upload function improvement: Chinese character detection and text content processing