Css style design

how to design the arrow style when clicking.

Mar.14,2021

draw triangles with the border of pseudo elements in this DIV and locate them.
Demo demo


<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <style>
    .item {
      background-color: deepskyblue;
      margin-bottom: 8px;
      width:160px;
      position: relative;
      height:40px;
      line-height: 40px;
    }
    .item::after {
      content: '';
      position: absolute;
      left:100%;
      width: 0;
      height: 0;
      border-top: 20px solid transparent;
      border-bottom: 20px solid transparent;
      border-left: 20px solid deepskyblue;
    }
  </style>
</head>
<body>
<ul style="list-style: none;">
  <li class="item">2+2</li>
  <li class="item">1+1</li>
</ul>
</body>
</html>

rectangle + triangle is made of border

Menu