Je ne dirai pas grand-chose sur d'autres connaissances sur la table bootstrap, je vous publierai simplement du code.
Le code clé est le suivant:
<! Doctype html> <html> <éadf> <tôme> </ title> <meta charset = "utf-8"> <link rel = "stylesheet" type = "text / css" href = "css / bootstrap.min.css"> <script type = "Text / javascrip <script type = "text / javascript" src = "js / jQuery-1.7.2.min.js"> </cript> <script src = "iscroll.js"> </ script> </ head> <body> <div id = "con"> <div id = "2"> <table <tr> <th> Colonne 1 </ Th> <Th> Colonne 2 </ Th> <Th> Colonne 1 </ Th> <Th> Colonne 1 </ Th> <Th> Colonne 1 </ Th> <Th> Colonne 1 </ Th> <Th> Colonne 2 </ Th> <TH> Colonne 2 </ TH> <TH> Colonne 3 </th> </tr> </thinde> <tbody style = "Block; Max-Height: 200px; Overflow-y: Scroll; "> <Tr> <Td> lundi </td> <td> mardi </td> <td> mardi </td> <td> mercredi </td> </tr> <tr> <td> lundi </td> <td> mardi </td> <td> mercredi </td> <Td> Mardi </td> <Td> mardi </td> <td> mardi </td> </tr> <tr> <Td> lundi </td> <Td> mardi </td> <td> mardi </td> <td> mardi </td> <td> mardi </ td> <td> <td> lundi </td> <td> mardi </ td> <td> <td> lundi </td> <td> mardi </td> <td> <td> lundi </td> <td> mardi </ td> <td> <td> lundi </td> <td> mardi </td> <td> <td> lundi </td> <td> mardi </ TD> <Td> Mercredi </td> <Td> Lundi </td> <Td> mardi </td> <Td> mardi </td> <td> mercredi </td> </tr> <tr> <td> lundi </td> <td> mardi </td> <td> lundi </td> <td> lundi </td> <td> lundi </td> <td> lundi </TD> <td> mardi </td> <td> lundi </td> <td> mardi </td> <td> lundi </td> <td> mardi </td> <td> lundi </td> <td> mardi </td> <td> mardi </ td> <td> mardi </ td> lundi </td> <td> mardi </td> <td> lundi </td> <td> mardi </td> <td> mardi </td> <td> mercredi </ td> mercredi </ td> </td> <td> mardi </pd> </v> </dsenthing> </ body> $ (document) .ready (function () {var _width = $ ('# 2'). width (); $ ('# 2 th: premier-enfant'). width (_width * 0.1); $ ('# 2 td: premier-enfant'). width (_width * 0.1); $ ('# 2 th: nth-child (2)'). width (_width * 0.2); $ ('# 2 td: nth-child (2)'). Largeur (_width * 0,2); $ ('# 2 th: nth-child (3)'). td: nth-child (3) '). largeur (_width * 0,3); $ (' # 2 td: nth-child (4) '). TD: Nth-Child (5) '). Largeur (_Width * 0.1); $ (' # 2 TD: Nth-Child (5) '). }) </cript> </html>Ce qui précède est l'exemple de code de l'en-tête de la table bootstrap fixe TBODY de défilement introduit par l'éditeur. J'espère que ce sera utile à tout le monde. Si vous avez des questions, veuillez me laisser un message et l'éditeur répondra à tout le monde à temps. Merci beaucoup pour votre soutien au site Web Wulin.com!