Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
<div class='content'>
    <div class='main'></div>
</div>
<div class='left'></div>
<div class='right'></div>
</body>
</html>
 
.content {
    float: left;
    width: 100%;
}
.main {
    height: 100px;
    margin-left: 120px;
    margin-right: 120px;
    background-color: red;
}
// 清除浮动
.main::after {
    display: block;
    content: '';
    height: 0;
    font-size: 0;
    clear: both;
    zoom: 1;
}
.left {
    float: left;
    margin-left: -100%;
    width: 100px;
    height: 100px;
    background-color: blue;
}
.right {
    float: right;
    margin-left: -100px;
    width: 100px;
    height: 100px;
    background-color: yellow;
}
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers