margin-top和-webkit-margin-before之间有什么区别

Ara*_*oft 25 html css webkit css3

Webkit添加了自己的特定边距:

-webkit-margin-before:
-webkit-margin-after:
-webkit-margin-start:
-webkit-margin-end:
Run Code Online (Sandbox Code Playgroud)

我理解(margin-left和-webkit-margin-start)或(margin-right和-webkit-margin-end)与"从左到右"或"从右到左"语言相关的区别.

我的问题是(margin-top和-webkit-margin-before)或(margin-bottom和-webkit-margin-after)之间有什么区别?

注意:很明显,-webkit前缀仅适用于webkit引擎浏览器,例如chrome和safari.这个问题与它无关.

Ara*_*oft 23

到目前为止,我能找到的最佳答案-web-margin-beforemargin-top普通文档的行为相同,但它将作为margin-bottom"自下而上"的语言(同样的想法适用于-webkit-margin-after).

您可以在此链接中找到许多"自下而上"的语言omn​​iglot.com/writing/direction.htm(感谢@MarkPlewis)

  • 一个有用的事情是,它们是边缘的"通用"情况.例如,在[flexbox](https://css-tricks.com/snippets/css/a-guide-to-flexbox/)中,它根据`flex-direction`正确设置元素的边距,而`margin- <方向>`什么都不做. (3认同)