liu.html
<!DOCTYPE html>
<html>
<head>
<meta charset = "UTF-8">
<title>刘</title>
<link rel = "stylesheet" type = "text/css"
href = "MyHtml.css">
<style type = "css/text">
</style>
</head>
<body>
<div class = "right"></div>
<div class= "left"></div>
</body>
</html>
liu.css
*{
padding:0;
margin:0;
}
.right{
position:absolute;
right:0;
width:100px;
height:100px;
background-color:red;
opacity:0.5;
}
.left{
margin-right:100px;
height:100px;
background-color:blue;
}