zzpda 2023-12-30 10:55 采纳率: 66.7%
浏览 36

html 的table中tr里的元素位置如何不让其居中显示

html 的table中tr里的元素位置如何不让其居中显示

img


关键代码如下:

 <tbody>
        <tr v-for="(item,index) in tableData " :key="index">
          <td>
            <div>
              <div>{{item.canci }}</div>
              <div> </div>
            </div>

          </td>

          <td v-for=" can  in item.canDatas" >
            <div style="height:100%;background-color: pink;position:relative; ">  <!--不启作用-->
              
            <div v-for="info in can.can_info" style="height: 100%; ">
              <div style="display: flex;flex-direction:row;margin-bottom:5px;">
                <div style="flex:2; background-color:yellow">{{info.name}}</div>
                <div  style="display: flex;flex:3;flex-direction:column;">


                  <div v-for="cl in info.cl_pre"
                    style="flex:3;display: flex;flex-direction:column;background-color: red;">
                    <div>{{cl}}</div>
                  </div>
                </div>
              </div>
            </div> 
            </div>
          </td>
        </tr>
      </tbody>

 <div style="height:100%;background-color: pink;position:relative; ">  <!--不启作用-->

有哪位知道如何处理吗?

  • 写回答

2条回答 默认 最新

  • Ma - hossihr 2024-01-21 09:20
    关注

    给table设置属性 align="center"

    评论

报告相同问题?

问题事件

  • 创建了问题 12月30日