带指示箭头的下拉菜单(css)

.wrap {
    position: relative;
    background-color: white;
    border: 1px solid grey;
    width: 300px;
    height: 600px;
  }
  .triangle1 {
    display: block;
    position: absolute;
    width: 0px;
    height: 0px;
    border: 8px solid transparent;
    border-bottom-color: grey;
    top: -17px;
    left: 20px;
  }
  .triangle2 {
    display: block;
    position: absolute;
    width: 0px;
    height: 0px;
    border: 8px solid transparent;
    top: -16px;
    border-bottom-color: white;
    left: 20px;
  }

html


展示:

带指示箭头的下拉菜单(css)_第1张图片

你可能感兴趣的:(css)