margin已经设置成0为什么还是回空一大块

import React, { Component } from 'react';
import { Row, Col, Button } from 'antd';
import styles from './index.less'
import Table from './Table'

class body extends Component {
    constructor(props) {
        super(props);
        this.state = {  
        }
    }

    render() {
     return(
       <Row justify="center" type="flex" align="top">
         <Col span={5}><img style={{width:272,height:168}} alt="" src="https://gw.alipayobjects.com/zos/rmsportal/mqaQswcyDLcXyDKnZfES.png" /></Col>
         <Col span={10}><Table /></Col>
         <Col span={5}>
           <div className={styles.tebleButten}>
             <Button className={styles.buttnn} icon="shopping-cart">充值</Button>
             <Button className={styles.buttnn} icon="edit">增加竞价</Button>
             <Button className={styles.buttnn} icon="fund">查看详情</Button>
           </div>
         </Col>
       </Row>
     )
    }
  }  

export default body;
.tebleButten{
  width: 150px;
  height: 168px;
  text-align: center;
    
}

  :global {
    .ant-col-18{
     display: inline-flex;
     flex-direction: row;
     margin: 0;
    .ant-col-5{
      width: 271px;
    }
    .ant-table-body{
      height: 167px;
    }
  }
    
   
  }
 

.buttnn{
  margin-top: 15px;
}

图片描述

阅读 2.6k
1 个回答

flex-grow属性设为1试试

另外"tebleButten"是不是不太对--"tableButton"

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题