Skip to content

面试题:使用 CSS 画一个三角形 #123

Description

@sisterAn
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>画三角形</title>
    <style>
        .triggle{
            width: 0px;
            height: 0px;
            border-width: 100px;
            border-style: dotted dotted solid dotted;
            border-color: transparent transparent red transparent;
        }
    </style>
</head>
<body>
    <div class="triggle"></div>
</body>
</html>


前端小技巧:边框写三角形

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions