css properties

Sep 21, 2016 pm 01:56 PM
css properties

Word Body Genus Sex

Font properties

Describe

font-family

Use a specified font name or a type of font family

font-size

The size of the font display

font-style

Use one of 3 methods to define the displayed font: normal (normal), italic (italic) or oblique (oblique)

font-weight

Use bold as the value to make the font bold

font-variant

Set up English case conversion

font{font-family: "宋体"; font-size: 12px; font-style: normal; line-height: 20px;font-weight: bold; font-variant: normal; text-transform: capitalize; color: # 666666; text-decoration: underline;}

genus

Text attribute

Description

letter-spacing

Define an amount of space appended between characters

Word-spacing

Define an amount of space appended between words

text-decoration

The text modification attribute allows text to be modified by one of 5 attributes

text-align

Set the horizontal alignment of text, including left alignment, right alignment, center, and alignment

  text-indent

The first line of text is indented

        line-height

The line-height property accepts a value that controls the spacing between text baselines

text-transform

Control the case of English text

font{letter-spacing: 2em; text-align: left; text-indent: 10px; vertical-align: middle; word-spacing: 5em; white-space: normal;}

side frame attribute

边 边 border-color Border color border-style Border style border-width Border width border-top-color Top border color border-left-color Left border color border-right-color Right border color border-bottom-color                               Bottom border color border-top-style Top border style border-left-style                       Bottom border style border-right--style Right border style       border-bottom-style                       Bottom border style border-top-width Top border width border-left-width                         Bottom border width border-right-width Right border width border-bottom-width                           Bottom border width border{ border-top-width: 1px; border-top-style: dotted; border-top-color: #FF0000;}

Border Frame Property

Describe

Border

Border

Border-top

 border-left

 Left border

 border-right

Right border

Border-bottom

                                                                  bottom border

🎜 🎜

Border attribute setting value

Border style attribute value

Describe

none

No borders

dotted

The border is composed of points

dash

The border is composed of short lines

solid

The border is a solid line

double

The border is a double solid line

groove

The frame has a three-dimensional groove

ridge

The border is formed into ridges

inset

There is a three-dimensional frame embedded in the frame

Outset

A three-dimensional frame is embedded outside the frame

Ding Bit Genus Sex

Positioning attributes

Describe

position

Absolute (absolute positioning) relative (relative positioning)

top

The distance between the layer and the vertical coordinate of the vertex

left

The distance between the layer and the abscissa of the vertex

width

The width of the layer

height

Height of layer

z-index

Determines the order and coverage relationship of layers. Elements with higher values ​​will cover elements with lower values

clip

Limit the display to only the cropped area. The cropped area is a rectangle. Just set two points. One is the vertex of the upper left corner of the rectangle, which is completed by the settings of top and right. The other is the apex of the lower right foot, which is completed by the settings of bottom and right

overflow

When the content in the layer exceeds the range that the layer can accommodate, Visible: the content will be displayed regardless of the size of the layer; Hidden: the content that exceeds the size of the layer will be hidden; scrol: regardless of whether the content exceeds the scope of the layer, select this items will add scroll bars to the layer; auto: only display scroll bars when the content exceeds the scope of the layer

visibility

This item is for the setting of nested layers. Nested layers are inserted into other layers and are divided into nested layers (child layers) and nested layers (parent layers). Inherit: The child layer inherits the visibility of the parent layer. If the parent layer is visible, the child layer is also visible; if the parent layer is invisible, the child layer is also invisible. Visible: Whether the parent layer is visible or not, the child layer is visible. Hidden: Whether the parent layer is visible or not, the child layer is hidden.

District Block Property

Block attributes

Describe

       width

Set the width of the object

height

Set the height of the object

float

Let text wrap around an element

Clear

Specify whether to allow surrounding text or objects on a certain side of an element

       padding

Determines how much space should be inserted between the border and the content. It has four attributes, namely: top (top), right (right), bottom (bottom), and left (left), which are used to set the top, bottom, left, and right padding distances respectively.

margin

Determines the spatial distance between the content block and the outer elements. They are: top (top), right (right), bottom (bottom), and left (left) are used to set the top, bottom, left, and right padding distances respectively.

#alignLeft{float:left;margin:0;padding:0;width:100px;height:100px;clear:both}

Column Table Attribute

List properties

Describe

list-style-type

Set the symbol type of the boot list item

list-style-image

Choose an image as a guide symbol for your project

li{ list-style-image:url(14-25.gif)}

list-stle-position

Determine the degree of indentation of list items

List symbol type attribute value

加 Add a lowercase Roman numeral in front of the text line upper-roman       lower-alpha upper-alpha none Does not display any bullets or numbersList position attribute value

List symbol type attribute value

Describe

disc

      Add a “●” solid circle in front of the text line

circle

              Add a “○” hollow circle in front of the text line

spuare

                Add a “■” solid square in front of the text line

decimal

加 Add ordinary Arabic numerals in front of the text line

lower-roman

加 Added to Rome in front of the text line

                                                                             Add lowercase English letters in front of the text line

        Add uppercase English letters in front of the text line

#alignLeft li { list-style-image: url(images/arrow1.gif);
list-style-type: none;list-style-position: outside;}

List position attribute valueDescription                                                                      

outside
The list is close to the left border

inside
List indentation

/*This is how comments are written*/

body {

/*Text attribute*/

font-size:12px;/*text size*/ color:#CCCCCC;/*text color*/

font-family:Arial, Helvetica, sans-serif;/*Set font*/

font-weight:bold;/*Bold text*/

text-align:center;/*The horizontal direction inside the DIV tag is centered or left/right*/

text-decoration:underline;/*Underline No underline is none*/

line-height:150%;/*Line heightcan also be pixelspx*/

/*Background attributes*/

/*Background Color*/

background-image:url(images/test.gif);/*background image*/

background-repeat:no-repeat;/*The background image is not tiled*/

background-position:5px 10px;/*The position of the background image, the first is the abscissa, the second is the ordinate*/

/*Padding and border properties*/

height: 100px; width: 100px;

margin:10px 0 5px 0;/*Container external margin The order is top right bottom left, when it is 0, no unit is needed*/

margin-top:10px; /*How to write a single item */

padding:10px 0 5px 0;/*Container internal margins, the order is top right bottom left, when it is 0, no unit is needed*/

float:left; /*1. Only use left right and */

when making column structures

/*List attributes*/

list-style-type:none;/*Eliminate the small black dots in front of ul unordered list li*/

display:block;/*Displayed in block form, usually used to achieve the mouse-over effect in links*/

display:inline;/*Use it only when the outer margin of the DIV that is moved to the side doubles when float is used. This is for a bug in IE6*/

/*Border attribute*/

border:1px solid #ccc;/*Border attributes of tables, DIV, LI, A and other containers, the dotted line is dashed*/

overflow:hidden;/*Hide the overflow part*/ overflow:auto;/*Automatically determine the height of the container and choose to automatically appear/hide the vertical scroll bar*/

/*Special attributes, do not need to be mastered by force*/

/*Vertical text arrangement:*/writing-mode: tb-rl;

/*Predetermined format*/

1

 

/*Character spacing*/ letter-spacing:5px;

/*word spacing*/ word-spacing:5px;

}

Positioning attributes

Describe

position

Absolute (absolute positioning) relative (relative positioning)

top

The distance between the layer and the vertical coordinate of the vertex

left

The distance between the layer and the abscissa of the vertex

width

The width of the layer

height

Height of layer

z-index

Determines the order and coverage relationship of layers. Elements with higher values ​​will cover elements with lower values

clip

Limit the display to only the cropped area. The cropped area is a rectangle. Just set two points. One is the vertex of the upper left corner of the rectangle, which is completed by the settings of top and right. The other is the apex of the lower right foot, which is completed by the settings of bottom and right

overflow

When the content in the layer exceeds the range that the layer can accommodate, Visible: the content will be displayed regardless of the size of the layer; Hidden: the content that exceeds the size of the layer will be hidden; scrol: regardless of whether the content exceeds the scope of the layer, select this items will add scroll bars to the layer; auto: only display scroll bars when the content exceeds the scope of the layer

visibility

This item is for the setting of nested layers. Nested layers are inserted into other layers and are divided into nested layers (child layers) and nested layers (parent layers). Inherit: The child layer inherits the visibility of the parent layer. If the parent layer is visible, the child layer is also visible; if the parent layer is invisible, the child layer is also invisible. Visible: Whether the parent layer is visible or not, the child layer is visible. Hidden: Whether the parent layer is visible or not, the child layer is hidden. css

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

Video Face Swap

Video Face Swap

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

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)

What does groove mean in css What does groove mean in css Apr 28, 2024 pm 04:12 PM

In CSS, groove represents a border style that creates a groove-like effect. The specific application is as follows: Use the CSS property border-style: groove; the groove-shaped border has a concave inner edge, a raised outer edge and a shadow effect.

Create dynamic background effects: flexible use of CSS properties Create dynamic background effects: flexible use of CSS properties Nov 18, 2023 pm 03:56 PM

Create dynamic background effects: The flexible use of CSS attributes in web design, background effects are a very important part, it can add a vivid atmosphere to the website and improve user experience. As a key language for web page style design, CSS gives full play to flexibility and diversity, and provides a wealth of attributes and techniques to create various dynamic background effects. This article will use specific code examples to introduce the flexible use of some common CSS properties to achieve wonderful dynamic background effects. 1. Gradient background Gradient background can add charm to the web page, making it

Angular components and their display properties: understanding non-block default values Angular components and their display properties: understanding non-block default values Mar 15, 2024 pm 04:51 PM

The default display behavior for components in the Angular framework is not for block-level elements. This design choice promotes encapsulation of component styles and encourages developers to consciously define how each component is displayed. By explicitly setting the CSS property display, the display of Angular components can be fully controlled to achieve the desired layout and responsiveness.

How to set html dotted border How to set html dotted border Apr 05, 2024 am 09:36 AM

In HTML, you can set the border to a dotted line through the CSS border-style attribute: determine the element to which you want to set a dotted border, for example, use the p element to represent a paragraph. Use the border-style attribute to set the dotted line style. For example, dotted represents a dotted line, and dashed represents a short dashed line. Set other border properties, such as border-width, border-color, and border-position, to control border width, color, and position.

How to set the background image in layui How to set the background image in layui Apr 26, 2024 am 02:45 AM

There are two ways to set the background image in layui: using CSS style: body { background-image: url("path/to/image.jpg"); } using layui API: layui.use('element', function() { element.addStyle('.layui-body{background-image: url("path/to/image.jpg");}') });

How to use CSS3 properties to achieve the wrapping effect of web page text? How to use CSS3 properties to achieve the wrapping effect of web page text? Sep 08, 2023 am 10:30 AM

How to use CSS3 properties to achieve the wrapping effect of web page text? In modern web design, text wrapping effects are a common and interesting presentation method. By using CSS3 properties, we can easily achieve the wrapping effect of web text. This article will introduce some commonly used CSS3 properties and their application in achieving text wrapping effects. 1. Float attribute The float attribute is an attribute used in CSS to set the float of an element. Combined with the clear attribute, the effect of text wrapping around the image can be achieved. Here is an example:&

The key optimization mode to improve website speed, every front-end developer must master! The key optimization mode to improve website speed, every front-end developer must master! Feb 02, 2024 pm 05:36 PM

A must-have for front-end developers: master these optimization modes and make your website fly! With the rapid development of the Internet, websites have become one of the important channels for corporate promotion and communication. A well-performing, fast-loading website not only improves user experience, but also attracts more visitors. As a front-end developer, it is essential to master some optimization patterns. This article will introduce some commonly used front-end optimization techniques to help developers better optimize their websites. Compressed files In website development, commonly used file types include HTML, CSS and J

How to solve the header misalignment problem of WordPress website? How to solve the header misalignment problem of WordPress website? Mar 01, 2024 am 09:54 AM

How to solve the header misalignment problem of WordPress website? When you encounter head misalignment issues on your WordPress site, it can be confusing and frustrating. This problem may be caused by a variety of reasons, such as CSS style errors, Javascript conflicts, plug-in issues, etc. In this article, we will discuss how to solve the header misalignment issue in WordPress and provide specific code examples. 1. Check CSS Styles First, check your theme CSS style sheet for errors or conflicts.

See all articles