---
id: 5a9d72a1424fe3d0e10cad15
title: Change a variable for a specific area
challengeType: 0
videoUrl: 'https://scrimba.com/c/cdRwbuW'
forumTopicId: 301085
localeTitle: 更改特定区域的变量
---
## Description
当你在:root
里创建变量时,这些变量的作用域是整个页面。
如果在元素里创建相同的变量,会重写:root
变量设置的值。
## Instructions
在penguin
class 里,设置--penguin-belly
的值为white
。
## Tests
```yml
tests:
- text: '应该在penguin
clas 里重定义--penguin-belly
的变量值,且它的值为white
。'
testString: 'assert(code.match(/.penguin\s*?{[\s\S]*--penguin-belly\s*?:\s*?white\s*?;[\s\S]*}/gi));'
```
## Challenge Seed
## Solution
```js
// solution required
```