The CSS schema in the BS project _ only loads the Css_ experience you need to communicate

Source: Internet
Author: User

First of all, the advantages of this architecture:
1. It is convenient to allocate heavy CSS writing work, without affecting each other.
2. Clear structure, facilitate maintenance and modification.
3. Each page will only load the CSS you need.

Summed up is: improve development efficiency, improve maintenance efficiency, improve the efficiency of Web page loading.

Let me explain the above CSS chart:

The 5 black icons in the middle of the diagram represent pages, one of which is a master page, and four below are child pages. People who use vs know the role of the master page, equivalent to the Include in ASP, the common part as a master, a separate part of the child page, improve development efficiency.

The green box above the figure is the global CSS section, which is stored in the Styles folder and is invoked by the master and acts on all child pages.

The blue dotted box above the figure is a single CSS section, each of which has a corresponding folder to store its own unique CSS file. They are stored in the styles/x folder. controlled by their respective C # files: When opening a different child page, the master loads the CSS for the current page.

The red box in the lower-left corner of the figure is the theme part that holds the overall style and picture. The function is the same as the green box, except that it is loaded by a child page and is not uniformly loaded by the master. This part of the merge with the green box is no big deal.

What's the use of so many CSS files next?

-adm/styles
--BASIC.CSS Global Base Style
--LAYOUT.CSS Global layout style (dimensions, positioning, etc.)
--GENERAL.CSS Global Aesthetic style (color, picture, etc.)
-adm/styles/groupmanager folder (example)
--GROUP_LAYOUT.CSS Group page-specific layout styles
--GROUP_GENERAL.CSS Group page Unique aesthetic style

Invoking so many CSS will result in more server requests, with a solution attached below.

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.