首页 > Web开发 > 详细

css画三角形

时间:2016-09-15 12:22:00      阅读:248      评论:0      收藏:0      [点我收藏+]

(根据调节边框的宽度来调节三角形形状)

技术分享

 

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>
演示代码
</title>
<style>
.a {width:0;height:0;border-left:50px solid transparent;border-right:50px solid transparent;border-bottom:100px solid red;}
</style>
</head>
<body>
<div class="a">

</div>
</body>
</html>

 

 

 

技术分享

<div id="tri"></div>

#tri{
width: 0px;
height: 0px;
border-top: 400px solid red;
border-right: 400px solid blue;
border-bottom: 400px solid green;
border-left: 400px solid yellow;
}

 

css画三角形

原文:http://www.cnblogs.com/sure2016/p/5874520.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!