84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
学习是最好的投资!
img{display: block;}
As the previous friend said, img is an inline element, just convert img into a block element
img is an inline element and has:
display: inline;
Similar to text, the baseline is not at the bottom of the container. This can be eliminated by setting the display or font-size attributes
header > a > img { display: inline-block; font-size: 0; }
You can also change the line-height of its parent element a
header > a { line-height: 0; }
Not border:none?
I wipe it, isn’t it text-decoration:none;?
Set the style of link a?
a
a { text-decoration: none; }
http://www.w3schools.com/css/css_link.asphttp://www.w3schools.com/css/tryit.asp?filename=trycss_link_decoration
Generally, pictures will be displayed directly without underlining. The underline appears because you wrapped the a tag in the image. You can write a{text-decoration:none;} in css to eliminate the underline of the a tag
Try adding a CSS reset?
Actually, I want to ask why if you set the background-color here in *{padding:0; margin:0; background-color: #ccc;}, any other tags will be affected.
*{padding:0; margin:0; background-color: #ccc;}
img{display: block;}
As the previous friend said, img is an inline element, just convert img into a block element
img is an inline element and has:
Similar to text, the baseline is not at the bottom of the container. This can be eliminated by setting the display or font-size attributes
You can also change the line-height of its parent element a
Not border:none?
I wipe it, isn’t it text-decoration:none;?
Set the style of link
a
?http://www.w3schools.com/css/css_link.asp
http://www.w3schools.com/css/tryit.asp?filename=trycss_link_decoration
Generally, pictures will be displayed directly without underlining. The underline appears because you wrapped the a tag in the image. You can write
a{
text-decoration:none;
}
in css to eliminate the underline of the a tag
Try adding a CSS reset?
Actually, I want to ask why if you set the background-color here in
*{padding:0; margin:0; background-color: #ccc;}
, any other tags will be affected.