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

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

【实现】:

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

相关文章:

  • 2021-05-26
  • 2022-12-23
  • 2021-08-02
  • 2022-12-23
  • 2022-12-23
  • 2021-12-14
  • 2022-12-23
猜你喜欢
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2021-08-30
  • 2022-12-23
  • 2021-10-13
  • 2021-11-20
相关资源
相似解决方案