如何将自定义滚动条应用于 Google 地图信息窗口
How to apply a custom scrollbar to Google Maps infowindow
我有一个 infowindow
,它在内容不适合 window 时使用垂直滚动条。我想将 jquery custom scrollbar 应用到带有细圆滚动条的 infowindow
(我认为这是默认皮肤)。
参见fiddlehere。我已经添加了所有必要的代码,但仍然显示默认滚动条。
正在加载:
$(document).ready(function () {
$(".mapInfoWindow").customScrollbar();
});
添加皮肤:
content: '<div class="mapInfoWindow modern-skin">'...
CSS:
.mapInfoWindow {
max-height: 100px;
}
编辑:
经过下面的回答,现在底部的滚动条被截断了,请看下图:
您可以使用 setInterval
调用 customScrollbar
和 link jQuery 自定义滚动条 css 文件到您的项目。
setTimeout(
function()
{
$(".mapInfoWindow").customScrollbar();
}, 3000
);
我有一个 infowindow
,它在内容不适合 window 时使用垂直滚动条。我想将 jquery custom scrollbar 应用到带有细圆滚动条的 infowindow
(我认为这是默认皮肤)。
参见fiddlehere。我已经添加了所有必要的代码,但仍然显示默认滚动条。
正在加载:
$(document).ready(function () {
$(".mapInfoWindow").customScrollbar();
});
添加皮肤:
content: '<div class="mapInfoWindow modern-skin">'...
CSS:
.mapInfoWindow {
max-height: 100px;
}
编辑: 经过下面的回答,现在底部的滚动条被截断了,请看下图:
您可以使用 setInterval
调用 customScrollbar
和 link jQuery 自定义滚动条 css 文件到您的项目。
setTimeout(
function()
{
$(".mapInfoWindow").customScrollbar();
}, 3000
);