×

用CSS3画几件漂亮的裙子

作者:andy0012019.01.14来源:Web前端之家浏览:11510评论:0
关键词:CSS3裙子

用CSS3画几件漂亮你的裙子,一起来学下咯。先看下效果图:

image.png

一共三种模式,一起来看下源码吧。

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>用CSS3画几件漂亮你的裙子</title>
<style type="text/css">
.container{
width: 100%;
height: 300px;
border: 1px solid #000;
display: flex;
justify-content: center;
align-items: center;
}
.size1{
width: 50px;
height: 0;
border-bottom: 150px solid #c32aff;
border-left: 80px solid transparent;  /*裙摆两边的角度*/
border-right: 80px solid transparent; /*裙摆两边的角度*/
border-radius: 0 0 50% 50%;           /*裙摆下脚的角度*/
}
.size2{
width: 100px;
height: 0;
border-bottom: 150px solid #02e60e;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-radius: 0 0 30% 30%;
}
.size3{
width: 150px;
height: 0;
border-bottom: 150px solid #ff2a2a;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-radius: 0 0 50% 50%;
}
</style>
</head>

<body>
    <div class="container">
        <div class="size1"></div>
        <div class="size2"></div>
        <div class="size3"></div>
    </div>
</body>
</html>

您的支持是我们创作的动力!
温馨提示:本文作者系 ,经Web前端之家编辑修改或补充,转载请注明出处和本文链接:
https://jiangweishan.com/article/qunzi12312409120498.html

网友评论文明上网理性发言 已有0人参与

发表评论: