Home Web Front-end CSS Tutorial Chapter 1 Basic understanding of CSS

Chapter 1 Basic understanding of CSS

Dec 19, 2016 pm 04:00 PM

About CSS Introduction

CSSS is the abbreviation of "Cascading Style Sheets", which is translated as "cascading style sheet" in Chinese, and some people only translate it as "style sheet". CSS is used for the layout and style design of web pages. In the so-called "new web pages", CSS is undoubtedly a very important part. CSS is based on the existing foundation to make up for the deficiencies in the existing HTML specifications and make web design more flexible. This teaching document is going to introduce you to the application of CSS! This article does not introduce all the specifications of CSS, but only introduces you to the syntax parts and application methods that are more commonly used and likely to be used in web page writing. Also, since the compatibility between the two browsers is gradually getting further away, we will carefully indicate the browsers that support this syntax for you. IE has supported some grammars since 3.0, and this will also be noted for you.

A brief introduction to each chapter

For the convenience of your reference and study, here is a brief explanation of the content contained in each chapter of this teaching document! Let you have a direction and concept for reference. Basically, the first two chapters focus on the establishment of concepts and basic cognition, that is, some root work for you; the third chapter provides you with additional explanations and explanations of other methods or features in application and settings. introduce. Chapters 4 to 6 focus on the introduction of syntax, parameters and properties, that is, the stuff that is really built in the style sheet. Chapter 1 Basic understanding of CSS: That’s it! Let me introduce you to some basic concepts and understanding of CSS. Chapter 2 Application Methods of CSS: Introducing you to the basic declaration, application methods and features of CSS. Chapter 3: Supplementary Applications of CSS: Introducing other declaration methods, applications and features of CSS. Chapter 4: CSS of page properties: Introducing you to the relevant syntax, parameters and properties of CSS of page properties. Chapter 5: Text-based CSS: Introducing you to the syntax, parameters and properties of text-based CSS. Chapter 6 Block-natured CSS: Introducing you to the block-natured CSS related syntax, parameters and properties.

Basic understanding of application

It is not difficult to apply CSSS, but please refer to the basic understanding here first. After you have a basic concept of some terms, you will have some ideas for the following teachings. Help, it doesn’t look too strenuous! 1. Understanding of basic terms: Element: that is, the tag in the basic syntax of HTML. Attribute: Attribute used to describe the characteristics of the label. For example:


, HR is the label, WIDTH is the attribute, and 80% is the value of the WIDTH attribute. Property (PRoperty): used to describe the characteristics of the component. Equivalent to attributes in basic HTML syntax. Style: has a set or array of properties to describe component characteristics. Selector: The component to which the style is applied. For example: In H3{ COLOR : BLUE }, H3 is the selector, COLOR is the property, and BLUE is the value of the COLOR property. 2. Understanding of basic units: There are two ways of unit expression: relative units and absolute units. Relative unit: "em": scale factor relative to the height of the letter. 『en』: Scale factor relative to font size. 『%』: Percentage relative to the length unit (usually the size of the current font). Absolute unit: "in": inches. "cm": centimeters. "mm": Millimeters. 『px』: pixel (system default unit). 『pc』: pica, unit of printing movable type. "pt": image point. Relative relationship: 1in= 6pc= 72pt= 2.54cm= 25.4mm 3. Understanding of color use: There are five ways to express color. 『#RRGGBB』: Three hexadecimal values ​​from 00 to FF represent the decimal values ​​of red, green and blue from 0 to 255 respectively. 『#RGB』: A simplified representation, using only three hexadecimal values ​​from 0 to F to represent the values ​​of the three primary colors of red, green and blue respectively. In fact, the browser will automatically expand to six hexadecimal values, such as "#ABC" will become "#AABBCC". However, it is obvious that this representation is not precise. "rgb(R,G,B)": Represents color by the three primary color values ​​of red, green, and blue with decimal values ​​from 0 to 255. "rgb(R%,G%,B%)": Use the relative numerical ratios of red, green, and blue to represent colors, such as "rgb(60%,100%,75%)". "Color_Name": express the color directly by the color name, there are 141 standard color names. 4. Understanding of URL representation: There are five ways of URL representation in CSS, and they are all legal declarations. You can choose them by yourself.


The above is the content of Chapter 1 Basic understanding of CSS. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!


Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Adding Box Shadows to WordPress Blocks and Elements Adding Box Shadows to WordPress Blocks and Elements Mar 09, 2025 pm 12:53 PM

The CSS box-shadow and outline properties gained theme.json support in WordPress 6.1. Let's look at a few examples of how it works in real themes, and what options we have to apply these styles to WordPress blocks and elements.

Create a JavaScript Contact Form With the Smart Forms Framework Create a JavaScript Contact Form With the Smart Forms Framework Mar 07, 2025 am 11:33 AM

This tutorial demonstrates creating professional-looking JavaScript forms using the Smart Forms framework (note: no longer available). While the framework itself is unavailable, the principles and techniques remain relevant for other form builders.

Demystifying Screen Readers: Accessible Forms & Best Practices Demystifying Screen Readers: Accessible Forms & Best Practices Mar 08, 2025 am 09:45 AM

This is the 3rd post in a small series we did on form accessibility. If you missed the second post, check out "Managing User Focus with :focus-visible". In

Create an Inline Text Editor With the contentEditable Attribute Create an Inline Text Editor With the contentEditable Attribute Mar 02, 2025 am 09:03 AM

Building an inline text editor isn't trivial. The process starts by making the target element editable, handling potential SyntaxError exceptions along the way. Creating Your Editor To build this editor, you'll need to dynamically modify the content

Working With GraphQL Caching Working With GraphQL Caching Mar 19, 2025 am 09:36 AM

If you’ve recently started working with GraphQL, or reviewed its pros and cons, you’ve no doubt heard things like “GraphQL doesn’t support caching” or

Making Your First Custom Svelte Transition Making Your First Custom Svelte Transition Mar 15, 2025 am 11:08 AM

The Svelte transition API provides a way to animate components when they enter or leave the document, including custom Svelte transitions.

Comparing the 5 Best PHP Form Builders (And 3 Free Scripts) Comparing the 5 Best PHP Form Builders (And 3 Free Scripts) Mar 04, 2025 am 10:22 AM

This article explores the top PHP form builder scripts available on Envato Market, comparing their features, flexibility, and design. Before diving into specific options, let's understand what a PHP form builder is and why you'd use one. A PHP form

File Upload With Multer in Node.js and Express File Upload With Multer in Node.js and Express Mar 02, 2025 am 09:15 AM

This tutorial guides you through building a file upload system using Node.js, Express, and Multer. We'll cover single and multiple file uploads, and even demonstrate storing images in a MongoDB database for later retrieval. First, set up your projec

See all articles