element-ui el-col怎么在span数量超过24的时候让元素还在一行显示?
我想让这些元素全部都在一行显示,然后可以用浏览器底部的滚动条进行拖动。
代码如下:
<template> <div>
<el-row :gutter="12">
<el-col :span="8">
<div class="grid-content bg-purple"></div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple-light"></div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple"></div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple-light"></div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple"></div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple-light"></div>
</el-col>
</el-row>
</div>
</template>
<style lang="scss" scoped>
.bg-purple {
background: #d3dce6;
}
.bg-purple-light {
background: #e5e9f2;
}
.grid-content {
border-radius: 4px;
height: 30px;
}
</style>
想问下,有没有什么方法
回答:
我认为超过了24就会换行,你这个功能只能不依赖ui库 自己实现
以上是 element-ui el-col怎么在span数量超过24的时候让元素还在一行显示? 的全部内容, 来源链接: utcz.com/p/933570.html