Use Clockwise Notation to Specify the Padding of an Element


除了分别指定元素的 padding-toppadding-rightpadding-bottompadding-left 属性外,你还可以集中起来指定它们,举例如下:

padding: 10px 20px 10px 20px;

这四个值以顺时针方式排列:顶部、右侧、底部、左侧,简称:上右下左。

使用顺时针方式设置 ".green-box" class,使其顶部和左侧具有 40pxpadding,而底部和右侧具有 20pxpadding


使用顺时针方式指定外边距

相关文章:

  • 2021-11-15
  • 2021-10-31
  • 2022-12-23
  • 2021-12-10
  • 2022-02-09
  • 2022-01-17
  • 2021-04-07
  • 2021-06-17
猜你喜欢
  • 2022-12-23
  • 2021-07-26
  • 2021-11-29
  • 2022-12-23
  • 2021-12-31
  • 2021-08-03
  • 2021-07-10
相关资源
相似解决方案