简体   繁体   English

尝试样式化openlayers3

[英]Trying to style openlayers3

How am I supposed to style openlayers3 in the best way possible? 我应该如何以最佳方式设置openlayers3的样式? I'm really struggling with this. 我真的为此感到挣扎。 The easiest way for me is to change the original ol.css, but that is not good practice. 对我而言,最简单的方法是更改​​原始的ol.css,但这不是一个好习惯。

For example, changing the placement of the control buttons to the right took me quite a while. 例如,将控制按钮的位置更改为右侧花费了我一段时间。

Should I do this with CSS or in JavaSCript? 我应该使用CSS还是JavaSCript来做到这一点?

I'm currently having issues with removing the tool-tip when hovering the buttons. 我目前在将按钮悬停时删除工具提示时遇到问题。 How do I do that? 我怎么做?

The tooltip has the class: 工具提示具有以下类别:

.ol-has-tooltip [role=tooltip]

How do I hide it? 如何隐藏它?

display:hidden

does not work. 不起作用。

Thanks for any advice and help. 感谢您的任何建议和帮助。

this will do 这会做

display:none;

try to use !important to overide already existed css property 尝试使用!important覆盖已经存在的CSS属性

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM