接口写好了吗 2022-04-15 15:56 采纳率: 80.2%
浏览 98
已结题

elementul用进度条组件,放在代码里如何调整上下位置呢,这旁边的为都会掉下来

img


<template>
  <div>
    <div>
      <div class="box" v-for="(item, index) in numList" :key="index">
        <span class="text">{{ leftList[index] }}</span>
        <div class="schedule"><el-progress :percentage="50"  v-show="leftList[index]==0||leftList[index]==180" :show-text="false"></el-progress></div>
        <div class="machine">{{ "A" + item }}</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      numList: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
      leftList: [
        215, 35, 143, 0, 112, 15, 312, 234, 180, 148, 95, 90, 80, 85, 94, 178,
      ],
    };
  },
  methods: {},
};
</script>

<style scoped>
.box {
  width: 6%;
  height: 100px;
  margin-right: 1px;
  border: 1px #ccc solid;
  display: inline-block;
  position: relative;
  background-color: #00b050;
  cursor: pointer;
}
.box:hover {
  background-color: #00b000;
}
.machine {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}
.text {
  font-size: 22px;
  font-weight: bold;
  margin-left: 5px;
  margin-top: 5px;
}
.schedule {

}
</style>

  • 写回答

3条回答 默认 最新

  • 众生皆苦唯有我甜 2022-04-15 16:13
    关注

    .box 添加 overflow: hidden;

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

问题事件

  • 系统已结题 4月23日
  • 已采纳回答 4月15日
  • 创建了问题 4月15日

悬赏问题

  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探