如何用CSS实现一个三角形

因为盒子的边框是这样的
在这里插入图片描述
当它小到一个只有边框的正方形的时候,就可以设置三条边为透明。

在这里插入图片描述

.container{
    
    
            width: 0%;
            height: 0%;
            background-color: #fff;
            border:50px solid;
            border-color: aqua transparent transparent transparent;
        }

猜你喜欢

转载自blog.csdn.net/rraxx/article/details/114699346