Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS: 画一个三角形 #65

Open
leslie1943 opened this issue Nov 24, 2020 · 0 comments
Open

CSS: 画一个三角形 #65

leslie1943 opened this issue Nov 24, 2020 · 0 comments

Comments

@leslie1943
Copy link
Owner

使用CSS 画一个三角形

.box {
            /* 居中 */
            margin: 0 auto;
            width: 0px;
            height: 0px;
            border-top: 20px solid rgba(48, 31, 141, 0);
            border-right: 20px solid rgba(29, 114, 117, 1);
            border-bottom: 20px solid rgba(170, 22, 136, 0);
            border-left: 20px solid rgba(144, 175, 29, 1);
        }

demo

<!DOCTYPE html>
<html lang="en">

<head>
    <title>Document</title>
    <style>
        .box {
            /* 居中 */
            margin: 0 auto;
            width: 0px;
            height: 0px;
            border-top: 20px solid rgba(48, 31, 141, 0);
            border-right: 20px solid rgba(29, 114, 117, 1);
            border-bottom: 20px solid rgba(170, 22, 136, 0);
            border-left: 20px solid rgba(144, 175, 29, 1);
        }
    </style>
</head>

<body>
    <div class="box"></div>
</body>

</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant