首页 > Web开发 > 详细

html6 border border-width border-style border-color CSS三角形

时间:2014-05-16 20:12:36      阅读:439      评论:0      收藏:0      [点我收藏+]
bubuko.com,布布扣
<!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>Document</title>

    <style type="text/css">

    div{
        margin:0 auto;
        margin-bottom: 10px;
    }


    #triangle-up{
        width:0;
        height:0;
        border-left:80px solid transparent;
        border-right:80px solid transparent;
        border-bottom:100px solid blue;
    }

    #triangle-right{
        width:0;
        height:0;
        border-top:80px solid transparent;
        border-bottom:80px solid transparent;
        border-left:100px solid blue;
    }

    #triangle-left{
        width:0;
        height:0;
        border-top:80px solid transparent;
        border-bottom:80px solid transparent;
        border-right:100px solid blue;
    }

    #triangle-down{
        width:0;
        height:0;
        border-left:80px solid transparent;
        border-right:80px solid transparent;
        border-top:100px solid blue;
    }

    #triangle-up-left{
        width:0;
        height:0;
        border-top:100px solid orange;
        border-right:100px solid transparent;
    }

    #triangle-up-right{
        width:0;
        height:0;
        border-top:100px solid orange;
        border-left:100px solid transparent;
    }


    #triangle-down-left{
        width:0;
        height:0;
        border-bottom:100px solid orange;
        border-right:100px solid transparent;
    }

    #triangle-down-right{
        width:0;
        height:0;
        border-bottom:100px solid orange;
        border-left:100px solid transparent;
    }

    </style>


</head>
<body>

    <div id="triangle-up"></div>

    <div id="triangle-down"></div>

    <div id="triangle-left"></div>

    <div id="triangle-right"></div>



    <div id="triangle-up-left"></div>

    <div id="triangle-down-right"></div>

    <div id="triangle-up-right"></div>

    <div id="triangle-down-left"></div>






</body>
</html>
bubuko.com,布布扣

 

html6 border border-width border-style border-color CSS三角形,布布扣,bubuko.com

html6 border border-width border-style border-color CSS三角形

原文:http://www.cnblogs.com/zy2012/p/3725338.html

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