Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Twitter bootstrap 如何制作对角线div_Twitter Bootstrap_Css_Css Shapes - Fatal编程技术网

Twitter bootstrap 如何制作对角线div

Twitter bootstrap 如何制作对角线div,twitter-bootstrap,css,css-shapes,Twitter Bootstrap,Css,Css Shapes,我正在尝试制作对角线div,因此我可以创建此形状: 我使用引导网格,我已经为这个形状制作了三个div容器 它将由3部分组成,其中2部分为对角线,1部分为直线。 我做了三个部分。但我不知道怎么做对角线 html: 请检查这个 这是密码 HTML 谢谢在我的网站上效果不好,你有没有更通用的方法?它应该有很多尺寸,也不是只有一个。你们能分享一下吗?? <body ng-app="appt" ng-controller="AppController" > <div c

我正在尝试制作对角线div,因此我可以创建此形状: 我使用引导网格,我已经为这个形状制作了三个div容器

它将由3部分组成,其中2部分为对角线,1部分为直线。 我做了三个部分。但我不知道怎么做对角线

html:

请检查这个

这是密码

HTML


谢谢

在我的网站上效果不好,你有没有更通用的方法?它应该有很多尺寸,也不是只有一个。你们能分享一下吗??
    <body ng-app="appt" ng-controller="AppController" >
    <div class="row test-row">
        <div class="col-lg-4 test-outbox">
            <div class="test-inbox test-inbox-center col-lg-10 col-lg-offset-1">
                <span class="test-s"></span>
                <span class="test-s"></span>
                <div class="test-d"></div>
            </div>
        </div>
        <div class="col-lg-4 test-outbox">
            <div class="test-inbox test-inbox-center col-lg-10 col-lg-offset-1">
            </div>
        </div>
        <div class="col-lg-4 test-outbox">
            <div class="test-inbox test-inbox-center col-lg-10 col-lg-offset-1"></div>
        </div>
    </div>
</body>
    .test-row{
    width: 100%;
    margin-right: 0;
    margin-left: 0;
    position: fixed;
    top: 100px;
}

.test-outbox{
    border:1px black solid;
    height:350px;
}

.test-inbox-center {
    height: 300px;         /*your login box height*/
    position: absolute;
    top: 50%;
    margin-top: -150px;    /*height/2*/
    border:1px black solid;
    border-radius: 3px;
    background-color:white;
    padding: 0;
}
.test-s:nth-child(even){
    height: 100px;
    width: 76px;
    top: 150px;
    position: absolute;
    border:1px black solid;
    right: 0;
}
.test-s:nth-child(odd){
    height: 100px;
    width: 76px;
    top: 150px;
    position: absolute;
    border:1px black solid;
    left: 0;
}
.test-d{

}
<div class="mainOuterDiv">
        <div class="middDiv">
            <div class="innerLeft"></div>
            <div class="innerRight"></div>
            <div class="textDiv"></div>
        </div>
    </div>
.mainOuterDiv{
    width:200px;
    height:200px;
    border:solid 2px #0CF;
    overflow:hidden;
    background:#FFF;
}
.middDiv{
    width:70%;
    height:30px;
    border:solid 2px #0CF;
    margin:0px auto;
    position:relative;
    margin-top:50%;
}
.innerLeft{
    position: absolute;
    left: -32px;
    top: -13px;
    border: solid 2px #0CF;
    width:20%;
    height:100%;    
    z-index: 1;
    transform: skew(180deg,215deg);
}
.innerRight{
    position:absolute;
    border:solid 2px #0CF;
    right:-32px;
    top: -13px;
    width:20%;
    height:100%;
    z-index: 1;
    transform: skew(180deg,145deg);
}
.textDiv{
    background:#fff;
    z-index:9999;
    width:100%;
    height:100%;
    position:absolute;
}