---
id: 587d78a5367417b2b2512ad9
challengeType: 0
videoUrl: 'https://scrimba.com/c/c2MZVSg'
forumTopicId: 301076
title: 使用 CSS Transform scale 属性可以更改元素的大小
---
## Description
CSS 属性 transform
里面的 scale()
函数,可以用来改变元素的显示比例。下面的例子把页面的段落元素放大了 2 倍:
```css
p {
transform: scale(2);
}
```
## Instructions
把 id 为 ball2
的元素放大到原始大小的 1.5 倍。
## Tests
```yml
tests:
- text: '#ball2
的 transform
属性应该为原始大小的 1.5 倍。'
testString: assert(code.match(/#ball2\s*?{\s*?left:\s*?65%;\s*?transform:\s*?scale\(1\.5\);\s*?}|#ball2\s*?{\s*?transform:\s*?scale\(1\.5\);\s*?left:\s*?65%;\s*?}/gi));
```
## Challenge Seed
## Solution
```html
// solution required
```