用纯css实现一个三角形

border实现:

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>Title</title>

<style type="text/css">

.left{

width:0px;

height:0px;

border-top:50px solid rgba(0,0,0,0);

border-right:50px solid rgba(0,0,0,0);

border-bottom:50px solid blue;

border-left:50px solid rgba(0,0,0,0);

}

</style>

</head>

<body>

<div class="left"></div>

</div>

</body>

</html>

猜你喜欢

转载自blog.csdn.net/qq_36195950/article/details/81483403