observer = new IntersectionObserver if iframe in sichtbereich

Testen ob ein Element im Sichtbaren Bereich ist oder nur zur hälfte
Kommentar abgeben zu diesen Beitrag/Code ?
Dann hier klicken

Der hier verwendete Code

<!doctype html>
<html lang="de">
<head>
<style>
*{
margin:0;
padding:0;
}
body{
display:flex;
flex-direction:column;
min-height:4500px;
}
nav{
height:100px;
width:100%;
font-size:50px;
text-align:center;
border:2px solid black;
}
main{
font-size:20px;
text-align:center;
display:flex;
flex-direction:column;
min-height:4500px;
justify-content: space-around;
}
iframe{
border:2px solid black;
width:80%;
margin:0 auto;
text-align:center;
height:500px;
}
.info{
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX