CSS-画三角

要实现三角的效果有很多方法:

例如下面的页面就需要三角:

  其中,

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style type="text/css">
        div{
            width: 0;
            height: 0;
            border-top: 10px solid transparent;
            border-left: 10px solid transparent;
            border-right: 10px solid transparent; 
            border-bottom: 10px solid skyblue; 
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>

最后通过定位的方法放到合适的位置

原文地址:https://www.cnblogs.com/mrszhou/p/7235899.html