---
id: bad87fee1348bd9afdf08726
title: Use Clockwise Notation to Specify the Margin of an Element
challengeType: 0
videoUrl: ''
localeTitle: 使用顺时针符号指定元素的边距
---
## Description
让我们再试一次,但这次有margin
。不是单独指定元素的margin-top
, margin-right
, margin-bottom
和margin-left
属性,而是可以在一行中指定它们,如下所示: margin: 10px 20px 10px 20px;
这四个值的工作方式类似于时钟:top,right,bottom,left,并且将产生与使用边特定边距指令完全相同的结果。
## Instructions
使用Clockwise Notation
为blue-box
的元素在其顶部和左侧提供40px
的边距,但在其底部和右侧仅为20px
。
## Tests
```yml
tests:
- text: 你的blue-box
类应该给元素顶部40px
的margin
。
testString: 'assert($(".blue-box").css("margin-top") === "40px", "Your blue-box
class should give the top of elements 40px
of margin
.");'
- text: 您的blue-box
类应该赋予元素20px
margin
的权利。
testString: 'assert($(".blue-box").css("margin-right") === "20px", "Your blue-box
class should give the right of elements 20px
of margin
.");'
- text: 你的blue-box
类应该给元素的底部提供20px
的margin
。
testString: 'assert($(".blue-box").css("margin-bottom") === "20px", "Your blue-box
class should give the bottom of elements 20px
of margin
.");'
- text: 你的blue-box
类应该给元素左边40px
的margin
。
testString: 'assert($(".blue-box").css("margin-left") === "40px", "Your blue-box
class should give the left of elements 40px
of margin
.");'
```
## Challenge Seed
```html
margin
padding
padding
```
## Solution
```js
// solution required
```