JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://d3js.org/d3.v2.js"></script>
<section id="page_content">
    <div id="selection_line"></div>
</section>

CSS

section#page_content
{
    position: relative;
    margin: 100px auto 0px auto;
    
    width: 100%;
    height: 200px;
    
    background-color: steelblue;
}

div#selection_line
{
    position: absolute;
    z-index: 10;
    top: -25px;

    width: 1px;
    height: 250px;

    background-color: rgba(0, 0, 0, 0.6);
}

JavaScript

(function() {
    var selectline = document.getElementById('selection_line');
    var container = document.getElementById('page_content');
    var pos = 0;

    $(container).on('mousemove', function(e) {
        pos = e.pageX;
        console.log(pos);
        selectline.style.left = pos + 'px';
    });
})();