Here is a pop-up window, it is necessary that when it appears, the user could not scroll the content feed before closing it.

body{height:10000px;} div{ width:500px; height:400px; background:gray; position:fixed; top:90px; left:30%; display:none; } #q1:target, #q1:target+div{ display:block; } #q1{ position:fixed; top:0;left:0; bottom:0; right:0; background-color: rgba(000,000,000,.1); display:none; cursor: default; } 
 <a href="#q1">Открыть окно</a> <a href="#x" id="q1"></a> <div> <h1>Заголовок</h1> <p>Элемент</p> <a href="#x">Закрыть окно</a> </div> 

    1 answer 1

    Add overflow: hidden; in CSS. If only vertical / horizontal, then overflow-y: hidden; or overflow-x: hidden; .

    • Which selector? - PeGaS