How to use size attributes in CSS
This article mainly explains "how to use the size attribute in CSS," interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let Xiaobian take you to learn "how to use the size attribute in CSS"!
CSS size property
The CSS size property allows you to control the height and width of an element. Also, it allows you to increase the spacing between rows.
CSS height property
definition and use
The height property sets the height of the element.
description
This property defines the height of the element's content area, outside which padding, borders, and margins can be added. In-line non-replacement elements ignore this attribute.
examples
Set paragraph height and width:
p { height:100px; width:100px; }
browser support
All major browsers support the height attribute.
Note: The attribute value "inherit" is not supported in any version of Internet Explorer, including IE8.
possible values
CSS width property
definition and use
The width property sets the width of the element.
description
This property defines the width of the element's content area, outside which padding, borders, and margins can be added. In-line non-replacement elements ignore this attribute.
examples
Set paragraph height and width:
p { height:100px; width:100px; }
browser support
All major browsers support the width attribute.
Note: The attribute value "inherit" is not supported in any version of Internet Explorer, including IE8.
possible values
Other:
At this point, I believe we have a deeper understanding of "how to use the size attribute in CSS," so let's actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!