PHP前端开发

bootstrap4如何设置表格

百变鹏仔 1个月前 (11-14) #bootstrap
文章标签 表格

Bootstrap4 基础表格

Bootstrap4 通过 .table 类来设置基础表格的样式,实例如下:

实例

                                                                                                                                                                
FirstnameLastnameEmail
JohnDoejohn@example.com
MaryMoemary@example.com
JulyDooleyjuly@example.com

条纹表格

通过添加 .table-striped 类,您将在

内的行上看到条纹,如下面的实例所示:

实例

                                                                                                                                                                
FirstnameLastnameEmail
JohnDoejohn@example.com
MaryMoemary@example.com
JulyDooleyjuly@example.com

带边框表格

.table-bordered 类可以为表格添加边框

实例

                                                                                                                                                                
FirstnameLastnameEmail
JohnDoejohn@example.com
MaryMoemary@example.com
JulyDooleyjuly@example.com

鼠标悬停状态表格

.table-hover 类可以为表格的每一行添加鼠标悬停效果(灰色背景):

实例

                                                                                                                                                                
FirstnameLastnameEmail
JohnDoejohn@example.com
MaryMoemary@example.com
JulyDooleyjuly@example.com

黑色背景表格

.table-dark 类可以为表格添加黑色背景:

实例

                                                                                                                                                                
FirstnameLastnameEmail
JohnDoejohn@example.com
MaryMoemary@example.com
JulyDooleyjuly@example.com