What are the differences between negative values of vertical-align and negative values of margin-bottom? The following article will introduce to you the difference between negative values of vertical-align and negative values of margin-bottom. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.
Let’s first take a look at the values of vertical-align in W3C:
But it has a numerical value like this It’s rarely mentioned. Let’s look at this piece of code:
Here I wrote two p’s. They all contain the same img. The box is completely separated from the text flow, and the size is entirely supported by the child elements. What is the display effect?
vertical-alignwill increase the height of the container, while negative margin-bottom values will decrease it!
For more programming-related knowledge, please visit:Introduction to Programming! !
The above is the detailed content of What are the differences between negative vertical-align values and negative margin-bottom values?. For more information, please follow other related articles on the PHP Chinese website!