<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>用border画三角形</title>
<link rel="stylesheet" href="">
<style>
#trip1{
width:0px;
height: 0px;
border-top: 100px solid transparent;
border-right: 100px solid transparent;
border-bottom: 100px solid green;
border-left: 100px solid transparent;
float: left;
margin: 100px;
}
#trip2{
width:0px;
height: 0px;
border-top: 100px solid transparent;
border-right: 100px solid transparent;
border-bottom: 100px solid green;
border-left: 100px solid transparent;
margin: 100px;
}
#trip3{
width:0px;
height: 0px;
border-top: 100px solid transparent;
border-right: 100px solid transparent;
border-bottom: 100px solid green;
border-left: 100px solid transparent;
float: left;
margin-top: -200px;
margin-left: 100px;
clear: left;
}
#tree{
width: 50px;
height: 300px;
background-color: brown;
margin-top:-100px;
margin-left: 175px;
}
</style>
</head>
<body>
<div>
<div id="trip1"></div>
<div id="trip2"></div>
<div id="trip3"></div>
<div id="tree"></div>
</div>
</body>
</html>
近期评论