你可以使用 overlayOpacity
和 overlayColor
选项自定义叠加层的不透明度和颜色,以更改叠加层的外观。
¥You can customize the overlay opacity and color using overlayOpacity
and overlayColor
options to change the look of the overlay.
注意:在下面的示例中,我们使用了
highlight
方法来高亮元素。相同的配置也适用于游览步骤。¥Note: In the examples below we have used
highlight
method to highlight the elements. The same configuration applies to the tour steps as well.
¥Overlay Color
以下是一些使用不同叠加颜色的 driver.js 示例。
¥Here are some driver.js examples with different overlay colors.
import { driver } from "driver.js";
import "driver.js/dist/driver.css";
const driverObj = driver({
overlayColor: 'red'
});
driverObj.highlight({
popover: {
title: 'Pass any RGB Color',
description: 'Here we have set the overlay color to be red. You can pass any RGB color to overlayColor option.'
}
});