css properties in javascript code example
Example 1: access css property using javascript
const element = document.querySelector('.element')
const style = getComputedStyle(element)
Example 2: change style js
// select element from DOM
const el = document.querySelector('.para')
// change css style
el.style.color = 'purple'