0

私は以下のようなhandsontableを持っています

var $container = $("#example1");
$container.handsontable({
  //data: data1,
  rowHeaders:true,
  colHeaders: ["<input type='checkbox' name='selectall' class='headchecker' checked='checked'>", "Com", "Form", "Size", "Grade", "Brand", "Fineness", "Serial", "Gross", "Net", "Fine Oz", "Original Weight","selectall"],
  cols:13,
  minSpareRows: 100

});

<div id="example1" class="dataTable" style="width: 1170px; height: 450px; overflow: scroll;"></div>

アクセスできます

<style>
    ${"#example1"} table th{font-size:90%; font-weight:bold;}--Column Header
    ${"#example1"} table th:first-child{text-align:left;width:20px;}--rowHeader
    ${"#example1"} table th:first-child+th{width:3%;text-align:left;}--first column header
    ${"#example1"} table th:first-child+th+th+th+th+th+th+th+th+th+th+th+th+th{display:none;}--last column Header
    ${"#example1"} table tr:first-child{font-weight:bold;}--first row
</style>

しかし、私はアクセスできませんでした

 ${"#example1"} table tr td:first-child{font-weight:bold;}--first column

これを行う方法...?handontable の構造はどのようなものですか

<table><thead><th><td></td></th></thead><tbody><tr><td></td></tr></tbody>

handontable の正しい構造を教えてください....

4

2 に答える 2

0

変更してみてください:

 ${"#example1"} table tr td:first-child{font-weight:bold;}--first column

このため:

 ${"#example1"} table tr td:first-of-type{font-weight:bold;}--first column

の最初の子trth、rowHeaders を設定した場合です

編集: また...なぜ使用するのですか:

 ${"#example1"} table th:first-child+th+th+th+th+th+th+th+th+th+th+th+th+th{display:none;}--last column Header

それ以外の :

${"#example1"} table th:last-child{display:none;}--last column Header
于 2013-04-28T23:51:38.517 に答える
0

命名法

  • インデントは閉鎖を示します (したがって、終了タグでアウトラインを乱雑にする必要はありません)
  • スプラット (...) は、指定されたレベルで無限に繰り返されることを示します
  • ドットサフィックスは、handsontable適用されるクラス名を示します

回路図 (v 0.8.3)

table
  colgroup
    col
  thead
    tr
      th
        div.relative
          span.colHeader
      th...
  tbody
    tr
      td...
于 2013-02-20T08:28:08.473 に答える