css3基础01

三角形样例:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
      div{
          width:300px;
          height:100px;
          border:1px solid red;
          position:relative;
      }
      div::after{
          content:"";
          position:absolute;
          top:10px;
          right:10px;
          width:10px;
          height:10px;
          border-right:1px solid red;
          border-bottom:1px solid red;
          -webkit-transform: rotate(45deg);
          transition:all 0.6s;
      }
      div:hover::after{
          -webkit-transform: rotate(225deg);
      }
    </style>
</head>
<body>
    <div>
    </div>
</body>
</html>
上一篇:子选择器(重要)


下一篇:FREERTOS学习笔记一-跑马灯