用css3写出的倒三角形
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了用css3写出的倒三角形相关的知识,希望对你有一定的参考价值。
<!DOCTYPE html>
<html>
<head>
<meta charset="gb2312" />
<title>无标题文档</title>
<style>
.triangle-left {
width:0;
height:0;
border-right:20px solid yellow;
border-top:20px solid transparent;
border-bottom:20px solid transparent;
}
.triangle-up {
width:0;
height:0;
border-bottom:20px solid yellow;
border-left:20px solid transparent;
border-right:20px solid transparent;
}
.triangle-right {
width:0;
height:0;
border-left:20px solid yellow;
border-top:20px solid transparent;
border-bottom:20px solid transparent;
}
.triangle-down {
width:0;
height:0;
border-top:20px solid yellow;
border-left:20px solid transparent;
border-right:20px solid transparent;
}
</style>
</head>
<body>
<div class="triangle-left"></div>
<div class="triangle-up"></div>
<div class="triangle-right"></div>
<div class="triangle-down"></div>
</body>
</html>
以上是关于用css3写出的倒三角形的主要内容,如果未能解决你的问题,请参考以下文章