<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
#settings { | |
width: 100px; | |
height: 100px; | |
position: fixed; | |
top: 10px; | |
z-index:2; | |
background-color:red; | |
} | |
#header { | |
width:200px; | |
height:20px; | |
position:fixed; | |
right:100px; | |
top:100px; | |
z-index:3; | |
background-color:green; | |
} | |
</style> | |
</head> | |
<body style="width:1000px;height:2000px;"> | |
<div id="settings" > | |
<div id="header">scroll offset is 1 | |
</div> | |
</div> | |
</body> | |
</html> |