--- id: 587d7791367417b2b2512ab4 title: Adjust the Width of an Element Using the width Property challengeType: 0 videoUrl: '' localeTitle: 使用width属性调整元素的宽度 --- ## Description
您可以使用CSS中的width属性指定元素的width 。值可以以相对长度单位(例如em),绝对长度单位(例如px)或其包含的父元素的百分比给出。这是一个将图像宽度更改为220px的示例:
img {
宽度:220px;
}
## Instructions
width属性添加到整个卡并将其设置为绝对值245px。使用fullCard类选择元素。
## Tests
```yml tests: - text: 您的代码应使用fullCard类选择器将卡的width属性更改为245像素。 testString: 'assert(code.match(/.fullCard\s*{[\s\S][^}]*\n*^\s*width\s*:\s*245px\s*;/gm), "Your code should change the width property of the card to 245 pixels by using the fullCard class selector.");' ```
## Challenge Seed
```html

Google

Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at Stanford University.

```
## Solution
```js // solution required ```