div 内元素居中
<div class="btn-center">
<el-button @click="onClear">Clear</el-button>
<el-button type="primary" @click="onRun">Run</el-button>
</div>
.btn-center {
display: flex;
justify-content: center;
text-align: center;
}
.btn-center > .el-button:first-child {
margin-right: 10px;
}
element 居中
- 可将每行划分为24个分栏
- 每个 el-col 可继续划分为24个子分栏
<div>
<span>每行24分栏布局</span>
<el-row>
<el-col :span="12" class="lightgreen-box">示例1</el-col>
<el-col :span="12" class="orange-box">示例1</el-col>
</el-row>
<el-divider></el-divider>
</div>
.lightgreen-box {
background-color: lightgreen;
height: 24px;
}
.orange-box {
background-color: orange;
height: 24px;
}