<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.jd {
position: relative;
100px;
height: 100px;
background-color: cornflowerblue;
margin: 100px auto;
}
.square {
position: absolute;
top: -40px;
left: 30px;
0;
height: 0;
border: 20px solid transparent;
border-bottom-color: cornflowerblue;
}
</style>
</head>
<body>
<div class="jd">
<div class="square"></div>
</div>
</div>
</body>
</html>