The main attributes of css text settings are: font-famil, font-size, color, text-align, text-decoration, border, text-shadow, Word-warp, Word-break, direction, etc.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
css text various attribute collection
1. Font attribute
font-family: 'Microsoft Yahei' Specify the font Css attribute to set the style
font-size: Set the font size.
font-weight: Set the thickness of the text
font-style: Set the font inclination. Possible attributes are normal, italic, and oblique;
line-height: Set the line spacing of the font;
color Font color
## 2. Text attributes
- text-align: Control the alignment of text
- text-indent: Control the first line of text The indentation can be px or %;
- white-space: the blank space in the document Attribute value:
- noraml: By default, multiple spaces are ignored and only one space is output.
- nowrap: Force no line breaks
- pre: Space/indent /Line wrapping will preserve
- pre-line: merge empty tables (multiple spaces will only output one space)
- pre-warp: Keep whitespace/indentation, normal line wrapping;
- letter-spacing: control the distance between letters;
- text-overflow: What happens when text overflows the containing element;
- Property value:
- clip Trim text.
- ellipsis Displays ellipses to represent trimmed text.
- string Use the given string to represent the trimmed text.
- word-spacing: Control the distance of spaces between words, use spaces to distinguish words, both Chinese and English are OK;
3. Underline attribute
text-decoration: Controls whether the text is underlined. Possible values are- none and no underline
- overline Defines a line on the text.
- line-through defines a line that passes under the text.
- underline Defines a line under the text.
4. Convert case
text-transform:Attribute value:- none (default) no conversion;
- capitalize: the first letter of each word is capitalized;
- upercase: conversion into uppercase;
- lowercase: into lowercase;
CSS video tutorial]
5. Border attribute
Description | |
---|---|
Abbreviated attribute, used to set attributes for four sides in one statement. | |
is used to set the style of all borders of an element, or set the border style for each side individually. | |
Shorthand attribute, used to set the width of all borders of an element, or set the width of each border individually. | |
Shorthand attribute, sets the color of the visible part of all borders of the element, or sets the color for each of the 4 sides. | |
Abbreviation attribute, used to set all attributes of the bottom border into one statement. | |
Set the color of the bottom border of the element. | |
Set the style of the bottom border of the element. | |
Set the width of the bottom border of the element. | |
Abbreviation property, used to set all properties of the left border into one statement. | |
Set the color of the left border of the element. | |
Set the style of the left border of the element. | |
Set the width of the left border of the element. | |
Abbreviation property, used to set all properties of the right border into one statement. | |
Set the color of the right border of the element. | |
Set the style of the right border of the element. | |
Set the width of the right border of the element. | |
Abbreviation attribute, used to set all attributes of the top border into one statement. | |
Set the color of the top border of the element. | |
Set the style of the top border of the element. | |
Set the width of the top border of the element. |
The above is the detailed content of What are the main properties of css text settings?. For more information, please follow other related articles on the PHP Chinese website!

CSS Grid is a powerful tool for creating complex, responsive web layouts. It simplifies design, improves accessibility, and offers more control than older methods.

Article discusses CSS Flexbox, a layout method for efficient alignment and distribution of space in responsive designs. It explains Flexbox usage, compares it with CSS Grid, and details browser support.

The article discusses techniques for creating responsive websites using CSS, including viewport meta tags, flexible grids, fluid media, media queries, and relative units. It also covers using CSS Grid and Flexbox together and recommends CSS framework

The article discusses the CSS box-sizing property, which controls how element dimensions are calculated. It explains values like content-box, border-box, and padding-box, and their impact on layout design and form alignment.

Article discusses creating animations using CSS, key properties, and combining with JavaScript. Main issue is browser compatibility.

Article discusses using CSS for 3D transformations, key properties, browser compatibility, and performance considerations for web projects.(Character count: 159)

The article discusses using CSS gradients (linear, radial, repeating) to enhance website visuals, adding depth, focus, and modern aesthetics.

Article discusses pseudo-elements in CSS, their use in enhancing HTML styling, and differences from pseudo-classes. Provides practical examples.


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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

SublimeText3 Chinese version
Chinese version, very easy to use

Dreamweaver CS6
Visual web development tools

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

WebStorm Mac version
Useful JavaScript development tools
