纯 CSS 创建一个三角形

【要求】:用纯CSS创建一个三角形的原理是什么?

♪ 答: 把上、左、右三条边隐藏掉(颜色设为 transparent)

【实现】:

#demo {
   0;
  height: 0;
  border- 20px;
  border-style: solid;
  border-color: transparent transparent red transparent;
}

原文地址:https://www.cnblogs.com/Ruth92/p/5879871.html