flex布局,内部元素过多时被压缩

<script setup lang="ts">
import { onMounted, ref } from 'vue'

onMounted(() => {
})
</script>

<template>
  <div>
    <div class="m-list">
      <div class="m-item" v-for="item in Array.from({ length: 20 }, (_, index) => index)">{
   
   { item }}</div>
    </div>
  </div>
</template>

<style>
.m-list {
  display: flex;
}
.m-item {
  flex: 300px;
  flex-shrink: 0;
}
</style>

人工智能学习网站

https://chat.xutongbao.top

猜你喜欢

转载自blog.csdn.net/xutongbao/article/details/143207561