<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>relative absolute overlap</title>
<style>
#container {
position:relative;
font-size:96px;
}
#abs1 {
position:absolute;
top:0px;
left:0px;
color:red;
}
#abs2 {
position:relative;
top:0px;
left:0px;
color:lime;
transition: opacity 1s ease;
cursor:pointer;
}
#abs2:hover {
opacity:0;
}
</style>
</head>
<body>
<h1>relative absolute overlap</h1>
<h2>Move the mouse over the text</h2>
<div id="container">
<div id="abs1">ABC</div>
<div id="abs2">XYZ</div>
</div>
</body>
</html>