JSFiddle - React, Tailwind, and code Playground

by Ritesh Pandey

HTML

<span class="fixed">I am a position:fixed span<span>

CSS

.fixed {
    position: fixed;
    background-color: hsl(0, 90%, 90%);
}

JavaScript

(function () {
    var elementList = document.getElementsByClassName('fixed')
    	,element = elementList[0]
        ,style
    ;
    
    style = window.getComputedStyle(element);
    
    alert(style.display);
})();