main {
    overflow: hidden;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -100px;
    margin-left: -200px;
    width: 400px;
    height: 200px;
    background-color: #ccc;
}
div {
    width: 100px;
    height: 100px;
    -webkit-border-radius: 50px;
       -moz-border-radius: 50px;
            border-radius: 50px;
    background-color: #fc0;
}
.circle-1 {
    position: absolute;
    top: -50px;
    left: -50px;
}
.circle-2 {
    position: absolute;
    bottom: -50px;
    right: -50px;
}

/* 可以尝试flex布局，改善内容变化时的居中效果 */