How to change a row element to a block element in css
This article mainly shows you the "css how to change the line element to the block element", the content is easy to understand, clear, hope to help you solve the doubt, the following let the editor lead you to study and learn "how to change the line element to the block element" this article.
In css, you can use the display attribute to convert a row element into a block element, which is used to specify the type of box that the element should generate, simply by adding a "display:block;" style to the row element.
The operating environment of this tutorial: windows7 system, CSS3&&HTML5 version, Dell G3 computer.
Row elements cannot be resized, such as span
Only block elements can be resized, such as div
Div {width: 100px; height: 100px; background-color: pink;} a {width: 100px; height: 100px; background-color: pink;} Block element Row element
So turn a row element into a block element?
In CSS, row elements can be converted into block elements through display:block
Div {width: 100px; height: 100px; background-color: pink;} a {width: 100px; height: 100px; background-color: pink; display: block} Block element Row element
The above is all the content of the article "how to change css elements to Block elements". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!