CSS-[Niuke news publishing system] and css news publishing system

Source: Internet
Author: User

CSS-[Niuke news publishing system] and css news publishing system

I. background:

With the development of the Internet, the personalized requirements of web pages are also constantly improved. HTML, HyperTextMarkupLanguage, and hypertext markup language are plain text, but users need more labels and attributes, and then add HTML tags and attributes, the webpage content and style are messy and cannot be easily maintained. At this time, CSS was born, realizing the separation of webpage content and styles, greatly improving the efficiency of writing and modifying pages!




Ii. What is CSS?

CSS (CasCading Style Sheets), stacked Style sheet, is a Style, content like a hamburger, layer by layer, sandwich ~


3. What is the CSS selector?


CSS selector is used to control one-to-one (ID), one-to-many (class), or multiple-to-one (TAG) elements on HTML pages. In fact, it is a matchmaker, connecting css and html.

The ID selector is similar to the ID card. It is more targeted for one person. class selector is often used in easyUI. For example, you can set the class in the control in easyUI to easyUI-datagrid, table styles can be well unified. I personally think that if many subsystems are attached to a large system, the class selector has a unique capability. The label selector, regardless of your head ), or the arm and leg (body) are all under the control of the tag ~


Type and priority of the CSS selector:

ID selector> class selector> HTML Tag Selector


The following uses a small DEMO to verify the priority of the selector:

1. First create a CSS style sheet on the client. The Code is as follows,

/** Created by: Wang Mei * Creation Time: February 23, 2015 16:14:53 * // * css style * // * tag selector */body {color: # f0f; /* pink */}/* class selector */. menu {color: # f00;/* red */}. title {/* news title style */color: # 00f;/* Blue */}/* ID selector */# special {font-weight: bold; /* Bold */color: #0f0;/* green */}

2. Create an HTML page:

<! DOCTYPE html> 
 
3. The result is displayed after running:





4. To sum up,Topic 4The class is menu. In css, the special color is green, the font color of menu is red, and column 4 is green. The priority ID selector> class selector is proved; in the body HTML Tag, the class is red. The default bodyHTML tag format is pink, which proves that the priority class selector> HTML Tag Selector


Iv. Summary

Abstract promotes programming progress.


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.