About the problem of margin calculation in UI design draft

insert image description here

insert image description here

As shown in the picture (sorry, the screenshot is a bit blurry):
the padding on the left and right of the fruit is 7px, the distance between the fruit and the vegetable is 13px, and this 13px is the padding-right that includes the vegetable, so the margin-right of the fruit (or the margin-left of the vegetable) ) should be 13-7=6px.
code show as below:

 padding:  2px 7px;
  margin-right: 6px;
}

Guess you like

Origin blog.csdn.net/qq_42931285/article/details/123948939