mi handontable の行の高さを変更したい。列の幅は既に変更しています (colWidths: [75,75,75]) が、行で同じことを行う方法が見つかりません。
ありがとう!
mi handontable の行の高さを変更したい。列の幅は既に変更しています (colWidths: [75,75,75]) が、行で同じことを行う方法が見つかりません。
ありがとう!
私は同じ問題を抱えていました。css ファイルの 1 か所を変更する必要があります。または、html のスタイルを上書きすることもできます。
handsontable css ファイルで、スタイル .handsontable td を検索します。
.handsontable td {
border-right: 1px solid #CCC;
border-bottom: 1px solid #CCC;
height: 22px; /*change to the desired height value*/
empty-cells: show;
line-height: 21px;
padding: 0 4px 0 4px;
/* top, bottom padding different than 0 is handled poorly by FF with HTML5 doctype */
background-color: #FFF;
vertical-align: top;
overflow: hidden;
outline-width: 0;
white-space: pre-line;
/* preserve new line character in cell */
}
css 内で「高さ」の値を必要な値に変更するか、html ドキュメントのスタイル セクションに次の行を追加します。
.handsontable td { height: <desired height>px;}
さらに、ファイル jquery.handsontable.js で RustyBadRobot によって言及された変更を行います。これは他の計算で使用できますが、これまでのところ css の変更で十分なようです。
これは handontable バージョン 0.11.3 で動作することに注意してください。これが他のバージョンでも当てはまるかどうかはわかりません。
colWidths
個々の行の高さを指定するために使用できるのと同様のパラメーターは知りませんが、 CSS を使用してすべての td 要素と th 要素の高さを指定できます。
例: _
.handsontable th,
.handsontable td {
line-height: 50px;
}