Extended question: how can I implement the display: inline-block effect for block elements in ie?
There are two methods:
1. Use the display: inline-block attribute to trigger the block element first, and then define the display: inline, let the block element be presented as an inline object (the two displays must be placed in two css tutorial declarations first, which is a classic bug in ie. If the display: inline-block is defined first, then set the display back to inline or block, and layout will not disappear ).
The code is as follows (... For other omitted attribute content, Firefox is not easy to use ):
Div {display: inline-block ;...}
Div {display: inline ;}
2. Set the block element to inline object submission (set the attribute display: inline), and then trigger the layout of the block element (for example, zoom: 1). Firefox is not easy to use ).
The code is as follows:
Div {display: inline; zoom: 1 ;...}