当前位置:网站首页>Comprehensive design of an oppe homepage -- Design of navigation bar
Comprehensive design of an oppe homepage -- Design of navigation bar
2022-07-26 16:19:00 【(-^_^-)】
First, analyze the content box In style settings
/* Initialize style */
/* Reset the default style */
*{
padding: 0;
margin: 0;
}
/* Clear the flag at the front of the list */
ol,ul{
list-style-type: none;
}
/* Clear the default style of hyperlinks */
a{
color: #666;/* gray */
text-decoration: none;/* Remove underscores */
}
/* Write left and right floats in the class */
.left{
float: left;
}
.right{
float: right;
}
/* Test part */
#top,#header,#nav,#banner,#star,#accessory,#world,#service,#alter_sale,#footer{
height: 100px;
width: 100%;
border: 1px solid #000;
}
.container{
width: 1280px;
border: 1px solid #f00;
margin: 0 auto; /* The content part is centered */
}
/**********************************************
***************** The top style of the page *****************
***********************************************/
#top{
height: 5px;
background-color: #00925f;
}
/**********************************************
***************** Page header style *****************
***********************************************/
#header{
height: 30px;
background-color: #2d2d2d;
}
/* Sina Weibo icon settings */
#header .xlwb{
width: 22px;
height: 19px;
background: url("../img/icons.png") no-repeat -48px -98px; /* Offset it */
}
/* Tencent Weibo icon settings */
#header .txwb{
width: 17px;
height: 24px;
background: url("../img/icons.png") no-repeat -28px -93px; /* Offset it */
}
/* Phone settings */
#header .tel{
color: #17925f;
font-size: 14px;
}
/* Implement one line display float */
#header .header_left div{
float: left;
margin:6px 10px 0px; /* From the above 6 Left and right margins 10 Bottom margin 0 */
}
#header ul li{
float: left;
line-height: 30px;
}
#header li a{
color: #b2b2b2;
font-size: 14px;
border-right: 1px solid #b2b2b2;
padding:0px 10px;/* The distance between the text and the border */
}
#header li a:hover{
color: #00925f;
}
#header .shop_car span{
width: 19px;
height: 16px;
margin-left: 10px;
display: inline-block; /* You can set up */
/* span It's an in-line element Cannot set inline width Change the display mode */
background: url("../img/icons.png") no-repeat 0px -96px;
}
#header .shop_car a{
border: none;
}
/**********************************************
***************** The navigation bar style of the page **************
***********************************************/
#nav{
height: 90px;
background-color: #eeeeee;
}
#nav li{
float: left;
margin: 0px 15px;
line-height: 90px; /* Writing in the middle */
}
#nav li a{
color: #666666; /* Text color */
font-weight: bold;/* Bold effect */
}
#nav li a:hover{ /* Pay attention to this : No space after */
color: #00925f; /* Text color */
font-weight: bold;/* Bold effect */
}
<!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>
<!-- At the top of the page -->
<div id="top">
<div class="container"></div>
</div>
<!-- The head of the page -->
<div id="header">
<div class="container">
<!-- There are three items on the left -->
<!-- /* Realize the whole float */ -->
<div class="header_left left">
<div class="xlwb"></div>
<div class="txwb"></div>
<div class="tel">4001-666-888</div>
</div>
<!-- The same style on the right is different The list fits a little There are five -->
<ul class="right">
<li><a href="#"> Sign in </a></li>
<li><a href="#"> register </a></li>
<li><a href="#"> Redeem points </a></li>
<li><a href="#"> Help center </a></li>
<li class="shop_car">
<span></span>
<a href="#"> The shopping cart </a>
</li>
</ul>
</div>
</div>
<!-- The navigation bar of the page -->
<div id="nav">
<div class="container">
<!-- There is one on the left -->
<div class="logo left">
<img src="img/logo.png" alt="logo">
</div>
<!-- The same style on the right is different The list fits a little Yes 7 term -->
<ul class="right">
<li><a href="#"> home page </a></li>
<li><a href="#"> mobile phone </a></li>
<li><a href="#"> parts </a></li>
<li><a href="#"> service </a></li>
<li><a href="#"> Experience shop </a></li>
<li><a href="#"> Software store </a></li>
<li><a href="#">ColorOS</a></li>
</ul>
</div>
</div>
<!-- Page banner -->
<div id="banner">
<div class="container"></div>
</div>
<!-- The star model part of the page -->
<div id="star">
<div class="container"></div>
</div>
<!-- Selected accessories of the page -->
<div id="accessory">
<div class="container"></div>
</div>
<!-- Search elements of the page opple part -->
<div id="world">
<div class="container"></div>
</div>
<!-- The service part of the page -->
<div id="service">
<div class="container"></div>
</div>
<!-- After sales service of the page -->
<div id="alter_sale">
<div class="container"></div>
</div>
<!-- Bottom of page -->
<div id="footer">
<div class="container"></div>
</div>
</body>
</html>Realization effect

边栏推荐
- 测试用例千万不能随便,记录由一个测试用例异常引起的思考
- vscode批量删除
- 一款可视化浏览器历史的 Firefox/Chrome 插件
- Google Earth Engine——MERRA-2 M2T1NXSLV:1980-至今全球压力、温度、风等数据集
- 研发效能的道与术 - 道篇
- Bucher gear pump qx81-400r301
- 提问征集丨快来向NLLB作者提问啦!(智源Live第24期)
- Which book is the "the Nine Yin Manual" in the field of programming
- 终于有人把红蓝对抗讲明白了
- 2022年最新西藏建筑施工架子工(建筑特种作业)模拟考试试题及答案
猜你喜欢

Botu PLC Sequential switch function block (SCL)

ACL-IJCAI-SIGIR顶级会议论文报告会(AIS 2022)笔记3:对话和生成

RE9: read the paper deal inductive link prediction for nodes having only attribute information
![[BJDCTF2020]Easy MD5](/img/6a/61a4b5624c33f1f334bea344cfa2c8.png)
[BJDCTF2020]Easy MD5

13 years of senior developers share a year of learning rust experience: from the necessary bibliography to code practice

Pat grade a 1048 find coins

Google Earth Engine——MERRA-2 M2T1NXAER:1980-2022年气溶胶逐日数据集

SQL statement -- single line comment and multi line comment

Collection of open source expert opinions on trusted privacy computing framework "argot"

PAT甲级 1047 Student List for Course
随机推荐
Draw a beautiful outline of the middle school playground and generate longitude and latitude data
初识OpenGL (2)编译着色器
想让照片中的云飘起来?视频编辑服务一键动效3步就能实现
Alibaba cloud DMS MySQL cloud database report error, solve!!
TKE集群节点max-pod是如何配置的
Parker solenoid valve d1vw020dnypz5
The "nuclear bomb level" log4j vulnerability is still widespread and has a continuing impact
How to use job plug-in type to call a kettle job through ETL scheduling tool taskctl?
Technology vane | interpretation of cloud native technology architecture maturity model
RE9: read the paper deal inductive link prediction for nodes having only attribute information
TDengine 落地协鑫能科,数百亿数据压缩至 600GB
First knowledge of OpenGL (2) compilation shaders
Google Earth engine - merra-2 m2t1nxlv: 1980 present global pressure, temperature, wind and other data sets
[physical simulation] the principle and practice of the simplest shape matching
Research and application of the whole configuration of large humanoid robot
Linux安装mysql8.0.29详细教程
JVM 的类初始化机制
We were tossed all night by a Kong performance bug
Parker pump pv140r1k1t1pmmc
2022牛客暑期多校训练营2(BDGHJKL)