Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  You can get properties of pseudo-element using JavaScript now

The pseudo-element6 in CSS is extremely useful, you can use it to create CSS triangles and lots of other elements without overuse many HTML elements. In the past, you cannot get the property value of pseudo-element in CSS using JavaScript. Now you can call a new method in JavaScript to get them easily.Assume you have below CSS codes:.element:before { content: 'NEW'; color: rgb(255, 0, 0);}To get the properties in .element:before, you can use below JavaScript method:var color = window.getComputedStyle( document.querySelector('.element'), ':before').getPropertyValue('color')You can put the pseud...

8,363 0       JAVASCRIPT PROPERTY PSEUDO-ELEMENT