我使用短代码在我的某个网页上嵌入HTML世界地图。在世界地图正下方是第三方链接,我想将显示值设置为"无",但是因为我没有CSS技能或web开发背景,所以我很难为此编写自定义CSS 。我玩过容器和特定页面ID,但没有运气。该页面是www.sheerheroine.com/map。任何人都可以指导我如何编写代码吗?当我检查页面时,我可以看到链接所在的容器,但是当我使用此容器时,将删除整个地图。谢谢!
答案 0 :(得分:-1)
!important
声明使得无法覆盖显示CSS。以下javascript将删除您不希望显示的元素 - document.getElementsByClassName('fm-map-container')[0].childNodes[3].remove();
。在开发人员的控制台中试用它。要使它在页面上工作,您需要延迟执行,直到该元素存在。正如其他人所说,它似乎违反了您正在免费使用的可爱矢量地图的使用条款。但是,对于概念验证,您可能会发现此代码具有启发性。
答案 1 :(得分:-2)
As the entire map con-taint is coming because of thirdparty image, better check with the that third party style code.
Or
in alternatively, just check the the height of the total map area.
lets assume here total height of map image is 10px from bottom.
and lets assume the height of that area(to which area,you don't want to show user) is 2 px from bottom.
Then create a div element, where you will put the entire map image, but follow the below stlye, where we can hide some portion of image to user
<div style="max-width: (10 - 2)px"> here .. put your map image url..</div>