--- id: bad87fee1348bd9afdf08726 title: Use Clockwise Notation to Specify the Margin of an Element challengeType: 0 videoUrl: 'https://scrimba.com/c/cnpybAd' forumTopicId: 18345 localeTitle: 使用顺时针方向指定元素的外边距 --- ## Description
让我们再试一次,不过这一次轮到margin了。 同样,每个方向的外边距值可以在margin属性里面汇总声明,来代替分别声明margin-topmargin-rightmargin-bottommargin-left属性的方式,代码如下: margin: 10px 20px 10px 20px; 这四个值按顺时针排序:上,右,下,左,并且设置的效果等同于特定声明每一个方向的margin
## Instructions
按照顺时针顺序,给".blue-box" class的上外边距以及左外边距设置为40px,右外边距和下外边距则设置为20px
## Tests
```yml tests: - text: 'blue-box class 的上外边距应为40px。' testString: assert($(".blue-box").css("margin-top") === "40px"); - text: 'blue-box class 的右外边距应为20px。' testString: assert($(".blue-box").css("margin-right") === "20px", 'blue-box class 的右外边距应为20px。'); - text: 'blue-box class 的下外边距应为20px。' testString: assert($(".blue-box").css("margin-bottom") === "20px", 'blue-box class 的下外边距应为20px。'); - text: 'blue-box class 的左外边距应为40px。' testString: assert($(".blue-box").css("margin-left") === "40px"); ```
## Challenge Seed
```html
margin
padding
padding
```
## Solution
```html // solution required ```