簡體   English   中英

將光標更改為數據表除最后一行以外的所有行的指針

[英]change cursor to pointer for all rows of the datatable except the last one

這是我到目前為止所做的

var table = new google.visualization.Table(document.getElementById('report_results'));
var view = new google.visualization.DataView(d);
var swidth = screen.width;
view.setColumns([2,3,4,5,6,7,8,9,10]);
var cssClassNames = {'hoverTableRow': 'hover-table-row'};
var swidth = screen.width;
table.draw(view, {height: 700,width:swidth,'cssClassNames':cssClassNames});

<style>
.hover-table-row{
        color: #9a64ff;
        cursor:pointer;
}
</style>

現在除了最后一行外,所有行都將光標作為指針,我該如何實現?

您可以完全使用CSS完成此操作。

將其添加到.hover-table-row CSS之后

.hover-table-tow:last-child {
  cursor: default;
  color: #000000;
}

更多信息:

https://developer.mozilla.org/en-US/docs/Web/CSS/:last-child

https://developer.mozilla.org/en-US/docs/Web/CSS/cursor

您需要使用CSS為最后一個單元格定義default光標值:

.hover-table-tow:last-child {
  cursor:default;
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM