From e4679071129eb052b850dddc73d0e5f931219db8 Mon Sep 17 00:00:00 2001 From: Ghost-017 <31908292+Ghost-017@users.noreply.github.com> Date: Sun, 30 Sep 2018 19:25:45 +0800 Subject: [PATCH] Update article.md --- 2-ui/1-document/08-styles-and-classes/article.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2-ui/1-document/08-styles-and-classes/article.md b/2-ui/1-document/08-styles-and-classes/article.md index 3227da15..3efd68f5 100644 --- a/2-ui/1-document/08-styles-and-classes/article.md +++ b/2-ui/1-document/08-styles-and-classes/article.md @@ -1,6 +1,6 @@ # Styles and classes -Before we get to JavaScript ways of dealing with styles and classes -- here's an important rule. Hopefully it's obvious enough, but we still have to mention it. +Before we get into JavaScript's ways of dealing with styles and classes -- here's an important rule. Hopefully it's obvious enough, but we still have to mention it. There are generally two ways to style an element: @@ -147,7 +147,7 @@ To set the full style as a string, there's a special property `style.cssText`: ``` -We rarely use it, because such assignment removes all existing styles: it does not add, but replaces them. May occasionally delete something needed. But still can be done for new elements when we know we don't delete something important. +We rarely use it, because such assignment removes all existing styles: it does not add, but replaces them. May occasionally delete something needed. But still can be done for new elements when we know we won't delete something important. The same can be accomplished by setting an attribute: `div.setAttribute('style', 'color: red...')`. ````