且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Highcharts工具提示隐藏在其他图表的后面

更新时间:2023-11-14 17:55:22

是纯html:任何div元素后加载(意味着出现在html页面后)将始终在前面。

This is pure html : Any div element loaded after ( meaning appearing after on the html page) will always be in front.

为了获得第一个图表工具提示在前面第二种:首先加载第二个,并使用css中的绝对或相对位置在页面上设置其y位置:

In order to get the first chart tooltip be in front of the second : load the second in first and set its y position on the page using an absolute or relative position in css :

我已更改它们的顺序, container2 首先在html中:

I've change their order, putting the container2 in first in html:

<div id="container2" style="height: 200px"></div>
<div id="container1" style="height: 200px"></div>

然后将 container2 的位置设置为第一个(谢谢到顶部样式属性):

Then set the position of container2 to be under the first one (thanks to the top style attribute) :

div[id="container2"] {
    position:absolute;
    top:200px;
}

结果如下: http://jsfiddle.net/Zw3uM/3/