3
<meta content="text/html; charset=windows-1251" http-equiv="Content-Type">
5
.d1{position:fixed;top:50%;right:50%;z-index:2;overflow:hidden;}
6
.d2{position:fixed;bottom:5em;left:50;z-index:2;overflow:hidden;}
7
.o {background:green;height:40px;width:200px;}
8
.t { width:2000px; height:198px;background-color: lightgray; border: 1px solid blue;}
12
function remove_fixed()
14
document.getElementById("d1").style.position = "static";
17
function change_fixed()
19
document.getElementById("d2").style.bottom = "10em";
24
<body class="Gradient">
25
<div class="d1" id="d1"><div class="o">This is a test</div></div>
26
<div class="d2" id="d2"><div class="o">This is a test</div></div>
27
<div class="t" onclick="remove_fixed();">
32
<button onclick="remove_fixed();">remove fixed</button>
36
<button onclick="change_fixed();">change fixed</button>