--- id: bad87fee1348bd9aedf06756 title: Override Class Declarations with Inline Styles challengeType: 0 videoUrl: '' localeTitle: 使用内联样式覆盖类声明 --- ## Description
所以我们已经证明了id声明覆盖了类声明,无论它们在style元素CSS中的声明位置如何。还有其他方法可以覆盖CSS。你还记得内联样式吗?
## Instructions
使用inline style尝试使我们的h1元素变白。请记住,在线条样式中如下所示: <h1 style="color: green;">h1元素上保留blue-textpink-text类。
## Tests
```yml tests: - text: 您的h1元素应该具有pink-text类。 testString: 'assert($("h1").hasClass("pink-text"), "Your h1 element should have the class pink-text.");' - text: 你的h1元素应该有blue-text 。 testString: 'assert($("h1").hasClass("blue-text"), "Your h1 element should have the class blue-text.");' - text: 您的h1元素应具有orange-text的ID。 testString: 'assert($("h1").attr("id") === "orange-text", "Your h1 element should have the id of orange-text.");' - text: 为您的h1元素提供内联样式。 testString: 'assert(document.querySelector("h1[style]"), "Give your h1 element an inline style.");' - text: 你的h1元素应该是白色的。 testString: 'assert($("h1").css("color") === "rgb(255, 255, 255)", "Your h1 element should be white.");' ```
## Challenge Seed
```html

Hello World!

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