Inherited CSS Values via Javascript -
On my page I'm changing some CSS styles via javascript. When I tried and pull a price which is inherited - it comes empty. Consider the following:
. Sliding {display: none; Hidden flurry; }. #looking the filterbox {height: 185px; Background color: fuscia; }
and html:
& lt; Div class = "sliding" id = "filterbox" & gt; & Lt; H3 & gt; Test Form & lt; / H3 & gt; This is an exam & lt; Br / & gt; 12345 & lt; / Div & gt;
If I look at the element ' document.getElementById (objname) .style.display ' its empty? How can I read the display value via javascript?
Would you like to use.
. Style
is a means of setting up and setting assets inline style (like a style feature).
Note, however, that for example nothing has to be done with heritage, just the rules set, which are of interest to you, apply those elements directly. Legacy takes place when an element takes the same style as its parent through the keyword inherit
.
Duration {color: heirs; }
getComputedStyle will also provide the final calculation value, so it will also lift the inherited values.
Comments
Post a Comment