您的位置:首页 > Web前端 > CSS

css3 添加三角形

2016-01-27 11:07 633 查看
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.c1 {
width: 0;
height: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-bottom: 100px solid blue;
}
.c2 {
width: 0;
height: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-top: 100px solid blue;
}
.c3 {
width: 0;
height: 0;
border-top: 50px solid transparent;
border-right: 100px solid blue;
border-bottom: 50px solid transparent;
}
.c4 {
width: 0;
height: 0;
border-top: 50px solid transparent;
border-left: 100px solid blue;
border-bottom: 50px solid transparent;
}
.c5 {
width: 0;
height: 0;
border-top: 100px solid blue;
border-right: 100px solid transparent;
}

.c6 {
width: 0;
height: 0;
border-top: 100px solid blue;
border-left: 100px solid transparent;
}
.c7 {
width: 0;
height: 0;
border-bottom: 100px solid blue;
border-right: 100px solid transparent;
}
.c8{
width: 0;
height: 0;
border-bottom: 100px solid blue;
border-left: 100px solid transparent;
}
</style>
</head>

<body>

<div class="c1"></div>
<div class="c2"></div>
<div class="c3"></div>
<div class="c4"></div>
<div class="c5"></div>
<div class="c6"></div>
<div class="c7"></div>
<div class="c8"></div>
</body>

</html>
/**上述的不同形状可以通过实现一个进而通过,旋转动画来达到希望要求***/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  css