【发布时间】:2016-03-10 07:37:41
【问题描述】:
我正在尝试制作对角线 div,所以我可以创建这个形状: 我使用引导网格,并且我已经为形状制作了三个 div 容器。
它将由 3 个部分组成,其中 2 个是对角的,一个是直的。 我做了3个部分。但我不知道如何使它成为对角线。
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>
css:
.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{
}
【问题讨论】:
标签: twitter-bootstrap css css-shapes