从 1.50 升级到 1.71 后在 InfoBox 中添加 CSS 的问题

问题描述

我刚刚完成了从 1.50 到 1.71 的升级

我正在使用此代码在 Iframe 中添加 css,但它不再起作用。

    viewer.infoBox.frame.addEventListener('load',function () {
                    var customCssLink = viewer.infoBox.frame.contentDocument.createElement('link');
                    customCssLink.href = relativeRootUrl + '/SomePath/CSS/CesiumPopUp.css';
                    customCssLink.rel = 'stylesheet';
                    customCssLink.type = 'text/css';
                    viewer.infoBox.frame.contentDocument.head.appendChild(customCssLink);});

你有什么建议可以帮助我吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)