This time I will show you how to use negative values in CSS marginWe know that margin in CSS can be set to negative values, so what are the negative values of using marginNote Matter , the following is a practical case, let’s take a look.
1.Margin touches first, then border, then padding, then content
2. If the value is negative, it will no longer occupy space
Example:. exmp{ width: 480px; margin-right:-450px; }
will only occupy 30px of horizontal width. If .exmp is set to left floating, then the left floating sibling elements behind .exmp will be arranged after 30px
I believe you have mastered the method after reading the case in this article. For more exciting things, please pay attention to php Chinese website Other related articles!
Related reading:
Use to write a Sanmao quotation and paragraph
HTML Improved inline style of "San Mao's Classic Quotations"
CSS(Cascading Style Sheets) collection
The above is the detailed content of How to use negative margin values in CSS. For more information, please follow other related articles on the PHP Chinese website!