1. css text attributes
(1) Text size {font-size:value;}
Unit: pt:9pt=12px; browser default font size is 16px
em: 1em=16px; medium:16px
large:19px
x-large:23px
xx-large:27px
(2)Font color
(3)Text font{font-family:"Font 1","Font 2","Font 3";}
The browser interprets it according to the font
Note: When the font name is in Chinese, add double quotes: "Microsoft Yahei"; a single English word does not need to be added: Arial; if there are spaces in English, add quotes: "Times New Romen";
(4) Font bold {font-weight:;}
(5)Text tilt
{font-style:itatic (italic)/oblique (oblique)/normal (cancel italic)}
(6) Horizontal alignment
{text-align:left/center/right/justify (justify both ends);}
(7)Vertical alignment
{vertical-align:top/bottom/middle;}
(8) Text line height
{line-height:normal/value;}
Measure line height: from the top of this line of text to the top of the next line of text; Single line of text: when line height = container height, vertically centered; when line height
Description: font abbreviation order: font-style font-weight font-size/line-height font-family;
(9) Text modification
{text-decoration:none/underline(underline)/overline(underline)/line-through(add strikethrough)}
(10) First line indent
{text-indent:value;}
Value is the number of words. The unit is: em;
It only works on the first line of text
(11) word spacing
{letter-spacing:value;}
Control the distance between English letters and Chinese characters
Extension: {word-break: break-all;}=
line break
2. Border
{border-top/bottom/right/left:1px solid/dotted/dashed/double;}
3. CSS list properties
(1) List symbol style
{list-style-type:disc(solid circle)/circle(hollow circle)/squrare(hollow square width)/none(remove list symbol);} {list-style-type:none} is equivalent to {list- style;none;}
(2) Pictures as list symbols
{list-style-image:url();}
(3) Define list symbol position
{list-style-position:ouside/inside;}
(4)Remove list symbols
{list-style:none;}
4. Background attributes
(1) Background color {background-color: value;}(2) Background image {background-image: url (path);}
(3) Background image tile {background-repeat: no-repeat (not tile )/repeat (tile)/repeat-x (horizontal tile)/repeat-y (vertical tile);}(4) Background image fixed {background-attachment: scroll (scroll)/fixed (fixed);} (5) Background image position {background-position: x y (value: 50px 50px; direction: right bottom;)} The direction positions are: horizontal (left/center/right) vertical (top/center/bottom)
(6) Abbreviation: {background:url() no-repeat center top fixed #f00;} {background:url() no-repeat center top 100px #f00 scroll;}
5. Commonly used image formats on web pages
(1) jpg: lossy compression loss of quality is suitable for images with rich colors
(2) gif: lossy compression loss of color supports transparency, animation is suitable for images with less color
Note: It requires high storage of png, higher requirement of storing gif, use gif when compatible;6. Floating (arrange vertical elements horizontally)
{float:left/right/none}
(1) Clear float {clear:left/right/both;}
Explanation: The element after floating is out of the document flow and is suspended above. When you float the element in front When the element is an element in the standard flow (without floating)
The position of the element after floating depends on the browser, and the non-floating elements behind the floating element will squeeze into the original position of the floating element.
(2) Solve the height collapse
Height collapse: The resulting condition is that the parent element does not write the height, and the child element floats;
Solution: (1) Add an empty
at the end of the floating element , write a statement div{clear:both;}
(2) Add a statement div{overflow:hidden;} to the parent element in css.
Seven, box model
1. Definition: How web page elements are displayed and their relationship with each other.
Border Border Filler Content Area
2. padding
(1) padding: padding is used to set the distance between the content of an element and the edge (border) of the element in an element on the page, padding;
(2) is used to adjust the content in the container The positional relationship in
(3) is used to adjust the position of the child element in the parent element
(4) The padding attribute is added to the parent element
Regarding the issue of whether the padding value should be reduced or not?
1. Subtraction: The parent element has width and height
2. No reduction: The parent element has no width and height;
(5) How to reduce?
Height - (top+bottom); Width - (left+right);
3. Syntax:
Four values: {padding: top right bottom left;}
One value: {padding: 20px}={padding:20px 20px 20px 20px;}
Two values: {padding: 20px 30px;}={padding: 20px 30px 20px 30px;}
Two values: {padding: 20px 30px 40px;}={padding: 20px 30px 40px 30px;}
Split: {padding-top/right/bottom/left:value;}
2. Margin
(1) Margin: margin is the blank area outside the element in the setting page;
(2) The margin attribute is added to the child element
(3) Syntax:
Four values: {margin: top right bottom left;}
One value: {margin: 20px}={padding:20px 20px 20px 20px;}
Two values: {margin: 20px 30px;}={padding: 20px 30px 20px 30px;}
Two values: {margin: 20px 30px 40px;}={padding: 20px 30px 40px 30px;}
Split: {margin-top/right/bottom/left:value;}
(1) Clear float {clear:left/right/both;}
Explanation: The element after floating is out of the document flow and is suspended above. When you float the element in front When the element is an element in the standard flow (without floating)
The position of the element after floating depends on the browser, and the non-floating elements behind the floating element will squeeze into the original position of the floating element.
(2) Solve the height collapse
Height collapse: The resulting condition is that the parent element does not write the height, and the child element floats;
Solution: (1) Add an empty
Border Border Filler Content Area
(1) padding: padding is used to set the distance between the content of an element and the edge (border) of the element in an element on the page, padding;
(2) is used to adjust the content in the container The positional relationship in
(3) is used to adjust the position of the child element in the parent element
(4) The padding attribute is added to the parent element
Regarding the issue of whether the padding value should be reduced or not?
1. Subtraction: The parent element has width and height
2. No reduction: The parent element has no width and height;
(5) How to reduce?
Height - (top+bottom); Width - (left+right);
3. Syntax:
Four values: {padding: top right bottom left;}
One value: {padding: 20px}={padding:20px 20px 20px 20px;}
Two values: {padding: 20px 30px;}={padding: 20px 30px 20px 30px;}
Two values: {padding: 20px 30px 40px;}={padding: 20px 30px 40px 30px;}
Split: {padding-top/right/bottom/left:value;}
(1) Margin: margin is the blank area outside the element in the setting page;
(2) The margin attribute is added to the child element
(3) Syntax:
Four values: {margin: top right bottom left;}
One value: {margin: 20px}={padding:20px 20px 20px 20px;}
Two values: {margin: 20px 30px;}={padding: 20px 30px 20px 30px;}
Two values: {margin: 20px 30px 40px;}={padding: 20px 30px 40px 30px;}
Split: {margin-top/right/bottom/left:value;}

The official account web page update cache, this thing is simple and simple, and it is complicated enough to drink a pot of it. You worked hard to update the official account article, but the user still opened the old version. Who can bear the taste? In this article, let’s take a look at the twists and turns behind this and how to solve this problem gracefully. After reading it, you can easily deal with various caching problems, allowing your users to always experience the freshest content. Let’s talk about the basics first. To put it bluntly, in order to improve access speed, the browser or server stores some static resources (such as pictures, CSS, JS) or page content. Next time you access it, you can directly retrieve it from the cache without having to download it again, and it is naturally fast. But this thing is also a double-edged sword. The new version is online,

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

This article demonstrates efficient PNG border addition to webpages using CSS. It argues that CSS offers superior performance compared to JavaScript or libraries, detailing how to adjust border width, style, and color for subtle or prominent effect

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

This article explains the HTML5 <time> element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SublimeText3 Mac version
God-level code editing software (SublimeText3)

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),
