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-inner {
width: 30px;
height: 20px;
}
.target {
position: absolute;
}
#target-1 {
background: cyan;
left: 50px;
}
#target-2 {
top: 20px;
left: 0;
background: blue;
}
#target-3 {
top: 20px;
left: 50px;
background: magenta;
}
</style>
<div class="container">
<div class="anchor"></div>
<div id="target-1" class="target">
<div class="target-inner"></div>
</div>
<div id="target-2" class="target">
<div class="target-inner"></div>
</div>
<div id="target-3" class="target">
<div class="target-inner"></div>
</div>
</div>