<!DOCTYPE html> | |
<!-- | |
| Like all positioned elements, relatively positioned inline elements should | |
| participate in stacking contexts, even when splitting occurs. | |
| https://www.w3.org/TR/CSS21/visuren.html#relative-positioning | |
--> | |
<html> | |
<head> | |
<style> | |
body { margin: 0px; font-family: Roboto; } | |
span { background-color: #009688; position: relative; top:50px; } | |
</style> | |
</head> | |
<body> | |
<div style="width:50px; background-color: #80CBC4"> | |
<span> | |
<span>xxx xxx</span> | |
</span> | |
</div> | |
</body> | |
</html> |