Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to merge cells in React

Shulou Source: shulou.com Published: 2022-05-31 13:34:12 09月24日 Update

This article mainly introduces "how to merge cells in React" related knowledge, editor through the actual case to show you the operation process, the method of operation is simple and fast, practical, I hope that this "how to merge cells in React" article can help you solve the problem.

React component file

Import React, {Component} from 'react';import'. / App.css' Class App extends Component {render () {return (form 4x4 00010203 10111213 20212223 30313233) 000103 101113 20212223 30313233 (rowSpan= "2") 00010203 101213 20212223 30313233);}} export default App

App.css

.App {text-align: center;} td {border: 1px solid # AB3319; width: 30px; height: 30px;} .title {color: # 444444; font-size: 20px; margin: 20px;} table {margin: 20px auto; border-collapse: collapse;}

Summary:

The style of React is generally written in the form of js objects, but the writing across rows and columns is special. It must be written to the location of the element attribute: 01.

What needs special attention is that row-span should be written as rowSpan and col-span should be written as colSpan.

This is the end of the introduction on "how to merge cells in React". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Tags: Unit writing knowledge industry different practical special location element content practicality actual object summary attribute form file article method more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Xiaomi NVidia Shulou Technology Huawei