In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article shows you the definition and usage of the HTML DOM padding attribute, which is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Focus on the use of the HTML DOM padding attribute, which is mainly used to set the inner margin of the element, which defines the space between the element border and the content of the element.
HTML DOM padding attribute
Definition and usage
The padding property sets the inner margin of the element.
The padding attribute defines the space between the element border and the element content.
This property can take four values:
If you specify a value, such as div {padding: 50px}-the padding on all four sides is 50px.
If you specify two values, such as div {padding: 50px 10px}-the upper and lower inner margin is 50px, and the left and right inner margin is 10px.
If you specify three values, such as div {padding: 50px 10px 20px}-the upper inner margin is 50px, the left and right inner margin is 10px, and the lower inner margin is 20px.
If you specify four values, such as div {padding: 50px 10px 20px 30px}-the upper inner margin is 50px, the right inner margin is 10px, the lower inner margin is 20px, and the left inner margin is 30px.
Syntax:
Object.style.padding=paddingPossible Values
Possible Values
Example
This example changes the inner margin of the element:
P {border: thin dotted # FF0000;} function changePadding () {document.getElementById ("p1") .style.padding = "2cm";}
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.