One problem today is that there is a blank gap between the upper and lower layers (the picture is placed in the layer)
Solution: locate the image code in the above div and set the attribute style = "display: block" for it. solution.
Or there is a div (with images) under img to set img (the object above the div) and its set attribute style = "display: block". The problem is OK.
Display: block indicates that the object is a block-level element (such as a and span ).
General Block-level elements such as paragraph <p>, title Table <uL> <ol> <dl>
, Table <table>, form <form>, DIV <div>, and BODY <body>. While inline Elements
For example, <input>, hyperlink <a>, image , and <span> ........
A notable feature of block-level element-free is that each block-level element is displayed from a new line, and the subsequent element-level element must be displayed in another line.
The text in the CSS authoritative guide shows that any visible element that is not a block-level element is an inline element. Its performance is"
Row layout, which means that the row layout is always displayed as a row. For example, we set an inline element border-bottom: 1px solid
#000; it indicates that each line is repeated, and there is a black fine line under each line. If it is a block-level element, the displayed black line will only appear below the block.
For example, the following code shows the differences between the inline element img and the block-level element div:
Html code
Src = "a.jpg" style = "border-bottom: 1px solid #000 ;" /> Src = "a.jpg" style = "border-bottom: 1px solid #000; display: block" /> <P> </p> Src = "a.jpg" style = "border-bottom: 1px solid #000; display: block" /> Src = "a.jpg" style = "border-bottom: 1px solid #000 ;" /> The effects of the above Code are as follows: