To obtain the calculated style in a CSS element (that is, the final style after cascading), browsers that support W3C can use the document.defaultView.getComputedSyle method. This method accepts two parameters. The first parameter is the element to be styled, and the second parameter is a pseudo-element string (for example: ":after". If there is none, it is set to null. This method returns a StyleSheetDeclaration object, and the final style property value is obtained through the getPropertyValue(propertyName) of the object. Note that the proprtyName here is of type wrold-world (eg background-color). In IE, the element.currentStyle[propertyName] method is used. Note that the propertyName here is of the worldWorld type (such as: backgroundColor). |
<<: What is the use of the enctype field when uploading files?
>>: JavaScript implementation of magnifying glass details
js execution Lexical analysis phase: includes thr...
As we all know, the CSS position absolute is set ...
The <marquee> tag is a tag that appears in ...
First, a common question is, what is the relation...
Use vue to simply implement a click flip effect f...
I encountered a very strange problem today. Look a...
<br />Previous article: Web Design Tutorial ...
Table of contents 1. Node builds HTTP server 2. H...
First of all, what is a font icon? On the surface...
1. InnoDB locking mechanism The InnoDB storage en...
This article example shares the specific code of ...
1. Check the character set of the default install...
1.MySQL multiple instances MySQL multi-instance m...
First, open the virtual machine Open xshell5 to c...
In our daily development work, text overflow, tru...