css画圣诞树

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>圣诞树</title>
<style>
#s1{
height: 0px;
width: 0px;
border-top: 0px;
border-right: 60px solid white;
border-bottom: 60px solid green;
border-left: 60px solid white;
margin-left: 40px;
}
#s2{
height: 0px;
width: 0px;
border-top: 0px;
border-right: 80px solid white;
border-bottom: 80px solid green;
border-left: 80px solid white;
margin-left: 20px;
}
#s3{
height: 0px;
width: 0px;
border-top: 0px;
border-right: 100px solid white;
border-bottom: 100px solid green;
border-left: 100px solid white;
}
#s4{
height: 100px;
width: 20px;
background: brown;
margin-left: 90px;
}
</style>
</head>
<body>
<div id="s1"></div>
<div id="s2"></div>
<div id="s3"></div>
<div id="s4"></div>
</body>
</html>

猜你喜欢

转载自blog.csdn.net/asjklm/article/details/80406367
今日推荐