Understand the principles of web page layout and the navigation bar. (Tom)-DD dog

Source: Internet
Author: User
Understand the principles of web page layout and the navigation bar. (Tom)-DD dog

Welcome to my blog. I am a web hacker. I hope you can learn more through the blog. Thank you.

Today, I have a brief understanding of the webpage layout and navigation bar. I will share some of my notes with you.


Simple webpage layout structure and performance principles:
In the web page layout, html: structured, css: expressive, JavaScript: Behavioral. There is a separation between the three (an idea ).
So what is separation? It is not simply separate editing. As mentioned above, html is directed to the structure. When we create a structure,
Html should be structured and simplified, and css should be carried out on this basis to achieve true separation and combination. In initial production, we should not pursue too much
Style, first efforts in the structure and semantics of html.

Simplify the html structure to the maximum extent, and then set it with css to reduce the html and css fit.

When you see a webpage design drawing, you must first perform the html structure and semantics before performing css design.

---- Text-indent text indent. (Simplified code)


Navigation menu creation:
① Vertical menu
Construct with unordered list

  • Navigation

Clear dots: list-style: none
Clear underline: text-decoration: none
** Definition keyIs to set the label as a block element to increase the effect of hover.
Ul li a {display: block ;}
A: hover {} adds the interactive menu effect.

Extended Review: block-level elements (blocks) have the following features: 1. Each block-level element occupies a single line.
The height, width, row height, and top and bottom margins of the two elements can be set.
3. If the width is not set, it is consistent with that of the parent element.
Inline features: 1. It is on the same line as other elements.
The height, width, row height, and top and bottom margins of the two elements cannot be set.
The width of the element 3 cannot be changed.
Inline block-inline features: 1. It is on the same line as other elements.
The height, width, row height, and top and bottom margins of the two elements can be set.


② Horizontal menu
Li floating Based on the vertical menu
Li {
Float: left
}
③ Rounded menu
There are two methods based on the horizontal menu:
1. Add a border-bottom for ul, and add a rounded image background for label. Move background: background-position:
2. Use border-radius.

The above content is from MOOC. Http://www.imooc.com/course/program

--- Restore content end ---

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.