我正在创建一个带有自定义工具栏的 OpenSeaDragon 查看器。似乎在普通模式下无论工具栏的位置如何,进入全屏模式时工具栏都会放在屏幕的顶部。我尝试搜索 OpenSeaDragon 文档,但在自定义工具栏上什至找不到任何提及。我目前这样设置查看器:<div class="grid-panel"> <div class="top"> <div id="vPnl"> </div> </div> <div class="footer"> <div id="vFooter"> <a href="#" id="vZoomIn">Zoom In</a> <a href="#" id="vZoomOut">Zoom Out</a> <a href="#" id="vHome">Home</a> <a href="#" id="vFullScreen">Full Screen</a> </div> </div></div>我用这个实例化查看器:bs.bkViewer = OpenSeadragon({ id: "vPnl", prefixUrl: "/lib/openseadragon/images/", tileSources: { . . . }, defaultZoomLevel: 0.3, toolbar: 'vFooter', zoomInButton: 'vZoomIn', zoomOutButton: 'vZoomOut', homeButton: 'vHome', fullPageButton: 'vFullScreen' });我想在进入全屏模式后能够控制工具栏的位置,可以吗?谢谢!
1 回答
繁星点点滴滴
TA贡献1803条经验 获得超3个赞
看起来您需要为其添加一些样式。OpenSeadragon 添加了fullpage您可以在选择器中使用的类。请注意,OpenSeadragon 还添加了position: relative您可能需要用!important. 例如:
#vFooter.fullpage {
position: absolute !important;
left: 20px;
bottom: 20px;
}
添加回答
举报
0/150
提交
取消
