The Style property is an object and can only return inline styles.
When you need to reference a CSS property with a minus sign in the middle, the DOM asks for the hump naming method, that is, the CSS property font-family becomes the DOM attribute fontFamliy:element.style.fontFamily
Regardless of the number of hyphens in the CSS style attribute's name, the DOM is all represented by the Hump naming method, which is the CSS property backg-color corresponding to the DOM attribute backgroundcolor.
CSS3 Brother selector: e~f
Syntax: e~f{....}
Selects all sibling elements after the E element f
CSS3 adjacent selector: e+f
Syntax: e+f{....}
Choose to cling to the E element after the F element
Pseudo-class: hover used to change the style of the link, if you want to use the pseudo-class when the mouse pointer over other elements to change the style, the browser is not so much to support this usage.
The ClassName property, which is a readable/writable property, has this attribute for all element nodes. You can use the ClassName property to get the class attribute of an element: element. ClassName can also update element properties: Element.classname=value, the disadvantage: Setting the Class property of an element with the ClassName property replaces the original class setting of the element.
Append the new class setting value to the ClassName attribute: elem.classname+= "Inrto";
Read "JavaScript DOM Programming Art (2nd edition)" Note 9