最近在看这个规范https://www.w3.org/TR/CSS2/vi...
其中一段
If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below.
rule number three是
'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right'
这前后文是不是矛盾,第一段说了If all three of 'left', 'width', and 'right' are 'auto'
,而规则3却说'left' is not 'auto'
还有第二个问题,First set any 'auto' values for 'margin-left' and 'margin-right' to 0
意思是如果margin设置为auto,那么则会被视为0
眼睛!
第二个问题是对的