[CSS 3] margin-trim

The margin-trim property allows the container to trim the margins of its children where they adjoin the container's edges.

https://developer.mozilla.org/en-US/docs/Web/CSS/margin-trim

For example, you have a list of card, each card has margin-bottom; you want to take off the last card;s margin-bottom:

.card {
  margin-trim: block-end;
}

 

posted @ 2023-07-06 03:05  Zhentiw  阅读(45)  评论(0)    收藏  举报