Home > front end >  In the Html navigation bar
In the Html navigation bar

Time:10-04

Could you tell me how to make the navigation bar V
Bosses to help me

CodePudding user response:

Can draw a diagram? Number of the navigation bar is fixed?

CodePudding user response:

Here send no I can't find where to send pictures

CodePudding user response:

I direct messages to you you look at the back to me

CodePudding user response:





<meta charset="utf-8" & gt;
<style type="text/CSS" & gt;
* {
Margin: 0;
padding: 0;
}
/* border box model, the padding and the content change does not affect the setting of high wide */
Div {
The box - sizing: border - box;
}
P {
text-align: center;
}
The container {
Width: 1000 px;
Height: 450 px;
Border: 1 px solid # 666;
Margin: 10 px auto;
Display: flex;
The flex - direction: the column;
The justify - content: space - around;
The align - items: center;

}
. Container. Nav {
width: 100%;
Display: flex;
The justify - content: space - between;
}
. Container. Nav a {
The font - size: 20 px;
}
. Container. Nav_1 {
Padding: 0 100 px;
}
. Container. Nav_2 {
Padding: 0 200 px;
}
. Container. Nav_3 {
Padding: 0 300 px;
}
. Container. Nav_4 {
Padding: 0 400 px;
}


. Float_container {
Width: 1000 px;
Height: 450 px;
Border: 1 px solid # 666;
Margin: 10 px auto;
}
The fl {
Display: inline - block;
float: left;
}
The fr {
Display: inline - block;
Float: right;
}
. Float_container. Nav {
width: 100%;
Height: 25%;
The line - height: 112 px;
}
. Float_container. Nav a {
The font - size: 20 px;
}
. Float_container. Nav_1 {
Padding: 0 100 px;
}
. Float_container. Nav_2 {
Padding: 0 200 px;
}
. Float_container. Nav_3 {
Padding: 0 300 px;
}
. Float_container. Nav_4 {
Padding: 0 400 px;
}
</style>

<body>

Flex layout: & lt;/p>



Float layout: & lt;/p>



  • Related