JSFiddle - React, Tailwind, and code Playground

HTML

<div class="x">
    <div class="abc">abc</div>
</div>

CSS

.x {
    height: 900px;
}
.abc {
    margin-top: 300px;
}

JavaScript

var elmPosition = function (elm) {
    var x = 0,
        y = 0;

    if (elm) {
        x += (elm.offsetLeft - window.pageXOffset + elm.clientLeft);
        y += (elm.offsetTop - window.pageYOffset + elm.clientTop);
        elm = elm.offsetParent;
    }

    return {
        x: x,
        y: y
    };
};


document.querySelector('.abc').addEventListener("mouseover", function () {
    var hoverBox = document.createElement("div");
    var position = elmPosition(document.querySelector('.abc'));
    hoverBox.textContent = 'just a tooltip';
    hoverBox.classList.add('tooltip');
    document.body.appendChild(hoverBox);
    hoverBox.style.position = 'fixed';
    hoverBox.style.top = (position.y - 20) + 'px';
});

document.querySelector('.abc').addEventListener("mouseout", function () {
    document.body.removeChild(document.body.querySelector('.tooltip'));
})