What are the differences between negative vertical-align values and negative margin-bottom values?

青灯夜游
Release: 2020-11-06 18:00:47
forward
2189 people have browsed it

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.

What are the differences between negative vertical-align values ​​and negative margin-bottom values?

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:


    Title  

张含韵

张含韵

Copy after login

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!

Related labels:
css
source:cnblogs.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!