CSS三角练习
程序员文章站
2022-05-26 22:22:33
...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS三角练习</title>
<style>
.box2{
position: relative;
left:100px;
width: 200px;
height: 200px;
background-color:pink;
margin:100px auto;
}
.box2 span{
position:absolute;
right: 5px;
top:-20px;
width:0;
height:0;
line-height:0;
font-size: 0;
border: 10px solid transparent;
border-bottom-color: pink;
}
</style>
</head>
<body>
<div class="box2"><span></span></div>
</body>
</html>
上一篇: CSS 分析倒三角|侧三角|正三角的实现
下一篇: 排序算法---快速排序(4)