A mnemonic for the order of CSS margin and padding shorthand properties

前端 未结 22 1558
长发绾君心
长发绾君心 2021-01-30 05:20

I can never remember the order of the shorthand property for setting the margin or padding in one declaration. That is:

margin-top:    2px;
margin-bottom: 4px;
m         


        
22条回答
  •  花落未央
    2021-01-30 05:24

    Actually the clock thing works perfectly. It is the most intuitive way to remember it, at least for me.

提交回复
热议问题