Home > Web Front-end > CSS Tutorial > How to use css padding-right property

How to use css padding-right property

silencement
Release: 2019-05-26 11:36:44
Original
4396 people have browsed it

How to use css padding-right property

padding-right attribute definition and usage

In css, the padding-right attribute is used to set the right padding (right padding). If you need to set the top, right, bottom, and left margins at the same time, you can use the padding attribute. The padding attribute can define the top, right, bottom, and left margins in one statement.

padding-right similar properties

padding-top property: top padding

padding-left property: left padding

padding-bottom attribute: bottom padding

Attribute syntax format

##css syntax: padding-right:length/%/inherit

JavaScript syntax: object.style.paddingRight="2cm"

Attribute value description

length: Specifies the fixed lower inner edge in specific units distance value, such as pixels, centimeters, etc. The default value is 0px

%: Defines the bottom padding as a percentage based on the width of the parent element. This value will not work as expected in all browsers

inherit: From the parent element Inherit the value of the padding-right attribute

Instance


How to use css padding-right property

##Running result


The above is the detailed content of How to use css padding-right property. 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