CSS——实现三角符号

91 阅读1分钟

盒子宽高均为0,三面边框皆透明

.item1{
    width: 0px;
    height: 0px;
    border-right: 100px solid transparent;
    border-top: 100px solid #f00;
    border-left: 100px solid transparent;
    border-bottom: 100px solid transparent;
  }