题解 | #绝对定位#
绝对定位
http://www.nowcoder.com/practice/d9c56c0e7418437cbb6a59632af72939
<html>
<head>
<meta charset=utf-8>
<style type="text/css">
.wrap {
width: 100px;
height: 100px;
border: solid 1px black;
/*补全代码*/
position: relative;
}
.btn {
width: 20px;
height: 20px;
text-align: center;
background-color: red;
/*补全代码*/
position: absolute;
right: -10px;
top: -10px;
}
</style>
</head>
<body>
<div class='wrap'>
<div class='btn'>X</div>
</div>
</body>
</html>