Can we define min-margin and max-margin, max-padding and min-padding in css?

后端 未结 19 1501
情话喂你
情话喂你 2021-01-31 01:01

Can we define min-margin and max-margin, max-padding and min-padding in CSS ?

19条回答
  •  离开以前
    2021-01-31 01:58

    I was faced with the same problem today. Apparently the solution is as simple as using :

    padding: calc(*put fixed pixels here*px + *put your required %age here*%) 
    

    Note that you do have to decrement the required %age a little to account for fixed pixels.

提交回复
热议问题