使用定位画广告居中五环

2018-12-25  本文已影响0人  DARKSIIIDE
<body>
    <div class="fivecircles">
        <div class="one1"></div>
        <div class="two2"></div>
        <div class="three3"></div>
        <div class="four4"></div>
        <div class="five5"></div>
    </div>      
</body>
*{
    padding: 0px;
    margin: 0px;
}
.one1{
    position: absolute;
    width: 100px;
    height: 100px;
    border: 10px solid blue;
    border-radius: 50% 
}
.two2{
    position: absolute;
    left: 80px;
    width: 100px;
    height: 100px;
    border: 10px solid black;
    border-radius: 50% 
}
.three3{
    position: absolute;
    left: 160px;
    width: 100px;
    height: 100px;
    border: 10px solid red;
    border-radius: 50% 
}
.four4{
    position: absolute;
    top: 60px;
    left: 40px;
    width: 100px;
    height: 100px;
    border: 10px solid yellow;
    border-radius: 50% 
}
.five5{
    position: absolute;
    top: 60px;
    left: 120px;
    width: 100px;
    height: 100px;
    border: 10px solid green;
    border-radius: 50% 
}
.fivecircles{
    position: fixed;
    left: 50%;
    top: 50%;
    margin-left: -160px;
    margin-top: -100px
}

知识点:
border-radius:圆角属性

上一篇 下一篇

猜你喜欢

热点阅读