Home > Web Front-end > CSS Tutorial > What does css right mean?

What does css right mean?

藏色散人
Release: 2020-09-17 11:44:50
Original
28366 people have browsed it

right means "right, right" in Chinese, and the right attribute in CSS specifies the right edge of the element. This attribute defines the offset between the right margin boundary of the positioned element and the right boundary of its containing block. , its syntax is like "img{position:absolute;right:5px;}".

What does css right mean?

The right attribute in css specifies the right edge of the element. This property defines the offset between the right margin edge of the positioned element and the right edge of its containing block.

Note:

If the value of the "position" attribute is "static", then setting the "right" attribute will have no effect.

For static elements, it is auto; for length values, it is the corresponding absolute length; for percentage values, it is the specified value; otherwise, it is auto.

For relatively defined elements, the calculated value of left is always equal to right.

Example:

Set the right edge of the image 5 pixels to the left of the right edge of its containing element:

img { position:absolute;right:5px;}
Copy after login

The above is the detailed content of What does css right mean?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source: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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template