Update article.md

Style is not a property, so I think you meant the display?
This commit is contained in:
Ghost-017 2018-10-01 12:36:19 +08:00 committed by GitHub
parent 880659f3c1
commit 378b8c2a90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -125,7 +125,7 @@ document.body.style.display = "none"; // hide
setTimeout(() => document.body.style.display = "", 1000); // back to normal
```
If we set `display` to an empty string, then the browser applies CSS classes and its built-in styles normally, as if there were no such `style` property at all.
If we set `display` to an empty string, then the browser applies CSS classes and its built-in styles normally, as if there were no such `display` property at all.
````smart header="Full rewrite with `style.cssText`"
Normally, we use `style.*` to assign individual style properties. We can't set the full style like `div.style="color: red; width: 100px"`, because `div.style` is an object, and it's read-only.