开发者

ie7 and ie6 don't appear to style class names within google maps api v3

开发者 https://www.devze.com 2023-01-25 02:25 出处:网络
ie6 and ie7 arent picking up class styling for map overlays (google.maps.OverlayView). has anyone else had this issue and worked it out?

ie6 and ie7 arent picking up class styling for map overlays (google.maps.OverlayView). has anyone else had this issue and worked it out?

eg i have an overlay like:

<div class="cp-map-pin cp-map-pinTboth" style="position: absolute; left: 326px; top: 241px;">
    <div class="cp-map-pi开发者_运维百科n-inner">
        <div class="cp-map-pin-contents">2</div>
    </div>
</div>

and ie6 and ie7 arent styling .cp-map-pin


i solved the issue! and to make a note for anyone else looking for this:

i was using the following which ie6/7 don't recognise as the class

divInner.setAttribute('class', 'classname');

i had to change it to

divInner.className = 'classname';

and it works fine


It's also worth noting that IE6 has buggy support for multiple class names in CSS: http://www.quirksmode.org/css/contents.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号