【CSS】绘制一个三角形

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
  <style>
    div{
      width: 0px;
      height: 0px;
      border: 20px solid transparent;
      /*border-top: 20px solid red;*/
      /*border-left: 20px solid rgba(0,0,0,0);*/
      /*border-right: 20px solid transparent;*/
      border-bottom: 20px solid red;
    }
  </style>
</head>
<body>
<div></div>
</body>
</html>

posted @ 2022-04-20 20:48  木子欢儿  阅读(79)  评论(0编辑  收藏  举报