2 <meta name=
"viewport" content=
"width=device-width">
4 .d1 {position:fixed; top:
5; right:
5; z-index:
2; overflow:hidden;}
5 .o {background:green; height:
40px; width:
200px;}
6 .t { width:
2000px; height:
198px; background-color: lightgray; border:
1px solid blue;}
13 function remove_child()
15 fixed
= document
.getElementById("d1");
16 fixed
.parentElement
.removeChild(fixed
);
21 document
.body
.appendChild(fixed
);
27 <div class=
"d1" id=
"d1"><div class=
"o">This is a test
</div></div>
33 <button onclick=
"remove_child();">remove fixed
</button>
37 <button onclick=
"add_child();">add fixed
</button>