Without further ado, I'll go straight to the code (Newbie: There's really nothing much to say) <!DOCTYPE html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <title>Navigation Bar</title> <style type="text/css"> #nav{ width:100%; height:39px; margin:0px; background:#808080 } #nav ul li{ margin:5px 10px; float:left; list-style:none; } #nav ul li a{ float:left; padding:0px 16px; <!--margin:auto;--> color:#ffffff; font-size:15px; } </style> </head> <body> <div id="nav"> <ul> <li ><a href="#">Home</a></li> <li ><a href="#">Friends</a></li> <li ><a href="#">Shop</a></li> <li ><a href="#">Download the client</a></li> </ul> </div> </body> </html> The main thing is to use CSS (Cascading Style Sheets) to format the HTML content (not very good at expressing); You can directly use the identifier to set the format of the element; to format an element with the id nav, add # in front of it; to modify the format of class="nav", add "." in front of nav. I am not very familiar with these three applications, so I will not talk about them in detail. I hope some experts can give me some guidance, or someone can discuss with me. CSS code can be written in the head of the HTML document using the start Here is a simple navigation bar CSS code, not much, just embedded in the head The above is a way to reference CSS: embedded style sheet --------------------------------------------------------------------------------------------------------------------------- If there are a lot of CSS codes, you can write the codes directly in the CSS file, and then use the link tag to introduce the style sheet CSS in the head of the HTML file. The second way to quote the above facts: external style sheet (nowadays web pages are complicated, this method is more commonly used) Another type is inline style sheets, which will not be explained here. Summarize The above is the editor's introduction to the simple navigation bar function implemented by html+css. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! |
<<: CentOS 7 cannot access the Internet after modifying the network card
>>: The Complete List of MIME Types
one. Mysql Binlog format introduction Mysql binlo...
When connecting to the local database, navicat fo...
After installing the database, if you accidentall...
1. Configuration By default, the first two are no...
Table of contents Preface JS Magic Number Storing...
The specific steps of installing mysql5.7.18 unde...
Table of contents definition The role of the curs...
Table of contents Requirement description: Requir...
Preface Docker has been very popular in the past ...
Before I start, let me emphasize that process.env...
This article mainly introduces the simple impleme...
This article shares with you how to implement dra...
Today, let's talk about a situation that is o...
1. Open the CentOS 7 virtual machine. 2. Log in t...
The main functions are as follows: Add product in...