Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<style>
.container {
width: 100px;
height: 100px;
border: solid 3px;
position: relative;
margin: 50px;
}
.anchor {
position: relative;
width: 50px;
height: 50px;
left: 40px;
top: 5px;
background: lime;
}
.target {
position: fixed;
background: cyan;
left: 111px;
}
</style>
<div class="container">
<div class="anchor"></div>
<div class="target">
<div style="width:30px;height:20px;"></div>
</div>
</div>