In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article examines "how to convert inline elements to block elements in css." The content is detailed and easy to understand, and friends who are interested in "how to convert inline elements into block elements in css" can follow the editor's train of thought to read it in depth. I hope it will be helpful to everyone after reading. Let's follow the editor to learn more about how to convert inline elements into block elements in css.
The css statement that converts inline elements to block elements is "inline element {display: block;}". The display attribute is used to define the type of display box generated by the element when the layout is established, and when the value of this attribute is "block", the specified element is displayed as a block-level element type.
The operating environment of this tutorial: windows7 system, CSS3&&HTML5 version, Dell G3 computer.
According to the css display classification, HTML elements are divided into three types: block elements, inline elements, and inline block elements.
In css, you only need to style an inline element to display:block to convert it to a block element.
The display attribute is used to define the type of display box that the element generates when the layout is established. For document types such as HTML, it can be dangerous to use display carelessly because it may violate the display hierarchy already defined in HTML. For XML, because XML does not have such a built-in hierarchy, all display is absolutely necessary.
Block: this element will be displayed as a block-level element with a newline character before and after it.
Inline: default. This element is displayed as an inline element without a newline character before and after the element.
Inline-block: inline block element. (new value for CSS2.1)
Css sets the inline style as a block element example:
Span {background-color: # 2cde57;} .span1 {display: block;width: 1000px;} first span, inline element second span, block element
What is the basic syntax of css? the basic syntax of css is: 1, the css rule consists of a selector and one or more declarations; 2, the selector is usually a HTML element that needs to change the style; 3, each declaration consists of an attribute and a value; 4, attributes and attribute values are separated by colons.
So much for sharing about how to convert inline elements into block elements in css. I hope the above content can improve everyone. If you want to learn more knowledge, please pay more attention to the editor's updates. Thank you for following the website!
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.