与 intro.js 相关的问题关注 HTML table 格式

issue related with intro.js focus on HTML table format

让我们将上图视为典型 HTML table。 Intro.js 有助于根据数据步骤集中注意力。

my Table是根据foreach循环生成的。

我想知道是否可以关注与图像相似的 table 列,而不是关注 <td><tr>

任何帮助都会非常好。

有一个开放的功能请求:https://github.com/usablica/intro.js/issues/57 所以我可以肯定地说你不能这样做。

你可以做的是用 position: absolute 创建一个虚拟透明 div 并通过 javascript 设置位置和大小,然后突出显示它。

在这里查看:https://jsfiddle.net/s848n5hs/2/

$('tr:first-child td').each(function(i) {
    $('.col' + (i + 1) + '_intro')
        .addClass('intro_div')
        .css('top', $(this).offset().top)
        .css('left', $(this).offset().left)
        .css('width', $(this).outerWidth())
        .css('height', $(this).closest('table').height())
})

introJs().start();