<style>
.wrapper{
width: 40px;
height: 40px;
background: #f00;
position: relative;
}
.wrapper::before{
content: '';
position: absolute;
border-left: 8px solid #abcdef;
border-bottom: 8px solid transparent;
border-top: 8px solid transparent;
right: -8px;
}
</style>
</head>
<body>
<div class="wrapper"></div>
</body>
只需要改变border,即可