效果图
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>定位练习</title>
<style>
* {
padding: 0px;
margin: 0px;
}
.ad {
position: relative;
width: 310px;
height: 190px;
margin: 100px auto;
padding: 10px;
border: 1px solid #00a4ff;
}
.up,
.down {
position: absolute;
width: 60px;
height: 54px;
}
.up {
top: 0px;
left: 0px;
}
.down {
right: 0;
bottom: 0;
}
</style>
</head>
<body>
<div class="ad">
<img src="images/adv.jpg" alt="哈根达斯" title="哈根达斯">
<img src="images/top_tu.gif" class="up">
<img src="images/br.gif" alt="" class="down">
</div>
</body>
</html>
素材: