css图标制作教程制作云图标
程序员文章站
2023-11-01 17:17:16
模仿某个云端软件的图标,用css做了一个云的图像,利用css3的选择器nth-of-type()设定div的第N个子元素以及style的边框长宽度属性... 14-01-19...
复制代码
代码如下:<div class="logo">
<div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div>
</div>
复制代码
代码如下:body{
background:#ddd
}</p> <p>.logo{
width:400px;
border:30px solid #3fb7f3;
height:210px;
background:#3fb7f3;
position:relative;
overflow:hidden;
margin:100px auto;</p> <p>}
.logo div{
border:20px solid #fff;
width:100px;
height:80px;
border-radius:50%;
position:absolute;
top:230px;
left:0;
}
.logo div:nth-of-type(1){
top:56px;
left:88px;
border-right-color: transparent;
border-bottom-color: transparent;
}</p> <p>.logo div:nth-of-type(2){
width:65px;
height:65px;
top:106px;
left:28px;
border-right-color: transparent;
}</p> <p>.logo div:nth-of-type(3){
width:114px;
height:114px;
top:6px;
left:156px;
border-bottom-color: transparent;
}</p> <p>.logo div:nth-of-type(4){
width:95px;
height:95px;
top:78px;
left:239px;
border-left-color: transparent;
}</p> <p>.logo div:nth-of-type(5){
width:100px;
height:100px;
top:97px;
left:253px;
background:#3fb7f3;
border:0
}</p> <p>.logo div:nth-of-type(6){
width:120px;
height:120px;
top:26px;
left:172px;
background:#3fb7f3;
border:0
}</p> <p>
.logo div:nth-of-type(7){
width:100px;
height:100px;
top:74px;
left:106px;
background:#3fb7f3;
border:0
}</p> <p>.logo div:nth-of-type(8){
width:70px;
height:70px;
top:124px;
left:48px;
background:#3fb7f3;
border:0
}</p> <p>.logo div:nth-of-type(9){
width:247px;
height:55px;
top:138px;
left:76px;
border-radius:0;
background:#3fb7f3;
border:0;
border-bottom:20px solid #fff
}
上一篇: 读取数据库中数据到数组的类
下一篇: 风趣的校园笑话 不许锤手表