react项目中rowSpan属性无效怎么处理?

<div>
                <table style = {tableStyle}>
                    <tbody>
                    <tr>
                        <td style={{whiteSpace:'nowrap', width: '1%', rowSpan: '3'}}>
                            <b>
                                <span style={{...fontStyle, color: '#0039b6'}}>S</span>
                                <span style={{...fontStyle, color: '#c41200'}}>o</span>
                                <span style={{...fontStyle, color: '#f3c518'}}>r</span>
                                <span style={{...fontStyle, color: '#c41200'}}>r</span>
                                <span style={{...fontStyle, color: '#0039b6'}}>y</span>
                            </b>
                        </td>
                        <td>  </td>
                    </tr>
                    </tbody>
                </table>
            </div>
阅读 5.3k
1 个回答

rowSpan 不是 style 里面的,是元素的属性

试试

<td style={{whiteSpace:'nowrap', width: '1%'}} rowSpan="3">
推荐问题