It is my understanding that inline elements can't usually be sized using CSS width
and height
properties. It seems that an inline img
is an exception to this, and that you can resize it using width
and height
.
img {
display: inline;
height: 35px; // this works
}
I'd like to understand if this is something specialized to an img
tag, or if there is some other nuance that makes this work.
Can someone point me towards some spec or documentation that describes this behavior?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…