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

What does css right mean?

藏色散人
藏色散人Original
2019-05-18 13:49:2928327browse

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;}

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!

Statement:
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