我需要构建一个动态模板来创建流程图,但只需要使用HTML和CSS。
见图像。
在这里输入图像描述
.page {
position: relative;
width: 800px;
height: 800px;
}
.row{
width: 100%;
text-align: center;
margin-bottom: 10px;
}
.element{
display: inline-block;
text-align: center;
width: 200px;
height: 50px;
border: 1px solid #000;
}<div class="page">
<div class="row">
<div class="element">Start</div>
</div>
<div class="row">
<div class="element">Step_1</div>
<div class="element">Step_2</div>
</div>
<div class="row">
<div class="element">Step_1_2</div>
</div>
<div class="row">
<div class="element">Ende</div>
</div>
</div>
也许有人能帮我实现布局。谢谢
发布于 2016-05-03 17:14:34
我想你是在找这样的东西:https://jsfiddle.net/m1pz6zcu/
.page {
width: 400px;
height: 400px;
border-style: solid;
border-width: 1px;
text-align: center;
}
.row {
width: calc(100% - 2px);
border-style: solid;
border-width: 1px;
border-color: red;
display: flex;
height: calc(25% - 2px);
}
.element {
min-width: 20%;
border-style: solid;
border-width: 1px;
border-color: green;
margin-right: auto;
margin-left: auto;
height: 50px;
height: calc(100% - 2px);
}https://stackoverflow.com/questions/37010051
复制相似问题