CSS画一个三角形

zengni 2019-10-21

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .triangle{
            width: 0;
            height: 0;
            border-top: 50px solid black;
            border-right: 50px solid transparent;
            border-left: 50px solid transparent;
        }
    </style>
</head>
<body>
    <div class="triangle"></div>
</body>
</html>

相关推荐

startXUEBA / 0评论 2016-05-30