The Display property specifies the type of box that the element should generate.
This property is used to define the type of display box generated by the element when the layout is established. For document types such as HTML, it can be dangerous to use display without caution because it may violate the display hierarchy already defined in HTML. For XML, all display is absolutely necessary because XML does not have this hierarchical structure built into it.
I. Detailed description of Display properties
1. Description of possible values for the display property of CSS
The following small series for everyone to bring a brief talk about the CSS display property possible values. Small series feel very good, now share to everyone, also for everyone to make a reference. Let's follow the little part together. None this element is not displayed.
Block this element will be displayed as a block-level element with a newline character before and after this element.
2. Detailed description of display properties in CSS
Display properties are supported by all major browsers.
Note: If it is stipulated! DOCTYPE, Internet Explorer 8 (and later) supports the attribute value "Inline-table", "run-in", "table", "Table-caption", "Table-cell", " Table-column "," Table-column-group "," Table-row "," Table-row-group ", and" inherit ".
3. Detailed display and visibility differences
Visibility hidden objects also retain the physical space occupied by the object display, and display is not retained.
Vilibility:hidden (hidden), visible (display) style= "Vislbility:hidden"
Display:none (Hidden), block (display) style= "Display:none"
4. In-depth understanding of CSS (display,float,position)
Display is used to set how elements are displayed
Display:block | none | Inline
Inline: Specifies that the object is an inline element
Block: Specifies that the object is a block element
None: Hide Objects
Two. Detailed description of the Displayblock property
1. What should I do if I can't display displayblock or inlineblock elements under chrome?
What about a display:inline-block or display:block element that doesn't display properly under chrome?
The demo page has only one input box, and the height becomes larger when the input box has focus, and displays the word count display and reply button.
Now the problem is, Chrome can only click on the input box after the first refresh and then the height will be larger and display the characters display and reply button elements, but then click the Second input box only the height becomes larger, but do not see the word Count and reply button elements (Firefox normal)
2. How to make div display and hide
The Display property sets how elements are displayed, the corresponding script attributes are display, the optional values are none, block and inline, and the values are described as follows:
None hides the element and does not preserve space when the element is displayed.
Block blocks the way the element is displayed.
Inline displays elements in embedded mode.
3. Why Li Inside-block is not valid in IE11 line break
Recently in a Web page tag list, requirements can not be wrapped, the first thought easier, 32 under the code is finished, and in the Firefox and Chrome browser test pass, but, in IE11 a look, but unexpectedly did not achieve the desired effect, Li Inside-block It's not working in IE11! So you can change!
Three. Detailed description of the Display:inline property
1. Detailed display:flex| in CSS | Inline-flex Property
Flex is the abbreviation for flexible box, meaning "resilient layout", which provides maximum flexibility for box-shaped models. Any container can be specified as a flex layout.
Flex: Display an object as an elastic telescopic box
Inline-flex: Display an object as an inline block-level elastic expansion box
2. How to solve the display:inline-block generated gap in CSS layout
In doing H5 horizontal sliding card when used to Display:inline-block, but found in the same level between the elements actually produced a gap, which is obviously not the effect I want, so I replaced the left float, so the gap problem is solved, But need to set the width of the parent element to achieve horizontal scrolling, which increases the amount of code, because the number of cards is not fixed, need to set the width of the parent element in real-time, it is necessary to use JS, so the amount of code increases, is not the best choice. It seems that the best solution is to use the Display:inline-block, so the problem of the gap arises.
Four. Detailed description of the Display:none property
1. What are the differences between Display:none and Visibility:hidden?
What I was saying was that both can implement the hidden element, but the element is set to Display:none, and then the document flow space occupied before the element is canceled, but Visibility:hidden, so that the element will still occupy space even if it is not displayed.
It was a telephone interview, and after I answered it, the other person did not continue to ask about display-related knowledge.
Now think of it, really lucky, if someone asked me about the display related knowledge, Display:inline-block use need to pay attention to the place. I'm sure I can't make it.
2. CSS Hide page elements 5 ways to explain
There are many ways to hide page elements in CSS. You can set opacity to 0, set visibility to hidden, set display to none, or set position to absolute and then set the location to a non-visible area.
Have you ever wondered why we have so many techniques to hide elements that they all seem to achieve the same effect? Each approach is actually slightly different from other methods, which determine which method to use in a particular situation. This tutorial will cover the small differences you need to keep in mind, allowing you to choose the methods that are appropriate to hide the elements according to different situations.
3. Tutorial showing an example of hiding a div with CSS3
Show the way to hide a p effect There are many, below for you to introduce the use of pure CSS3 is how to achieve, interested friends can refer to the next
Five. Related questions and Answers
1. A{display:block;} What is the difference between the display in JS?
2. Do both Li and ul need Display:inline?
3. Css-flex layout, Display:flex, problems with display:-webkit-box differences
"Recommended"
1. Detailed CSS box type and Display properties
2. Detailed CSS3 display:box box model properties