IE7, div-ы hover реагируют только на указатель мыши - PullRequest
1 голос
/ 28 февраля 2012

Я использую jQuery UI для наложения div.HTML-код выглядит следующим образом:

<div id="s7Wrapper" style="position: relative; width: 722px; height: 500px; text-align: center; margin-left: 39px; overflow-x: hidden; overflow-y: hidden; pointer-events: auto; ">
            <div id="center">
                <img class="s7urlloading" src="3.gif" style="position: absolute; width: 32px; height: 32px; z-index: 4000; margin-left: 344.94701910014567px; margin-top: 233.99999999999997px; display: none; ">
                <img class="s7url" src="'http://google.com" style="left: 0px; top: 0px; height: 499.99999999999994px; width: 721.8940382002913px; ">
            <div id="tooltip" class="text_7 ui-draggable" style="position: absolute; width: 247px; height: 53px; left: 20px; top: 403px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dotted; border-right-style: dotted; border-bottom-style: dotted; border-left-style: dotted; border-top-color: white; border-right-color: white; border-bottom-color: white; border-left-color: white; border-image: initial; "></div>
<div id="tooltip" class="text_6 ui-draggable" style="position: absolute; width: 246px; height: 33px; left: 22px; top: 353px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dotted; border-right-style: dotted; border-bottom-style: dotted; border-left-style: dotted; border-top-color: white; border-right-color: white; border-bottom-color: white; border-left-color: white; border-image: initial; "></div>
<div id="tooltip" class="text_5 ui-draggable" style="position: absolute; width: 248px; height: 51px; left: 20px; top: 291px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dotted; border-right-style: dotted; border-bottom-style: dotted; border-left-style: dotted; border-top-color: white; border-right-color: white; border-bottom-color: white; border-left-color: white; border-image: initial; "></div>
</div>
</div>
</div>

Эти перетаскиваемые пользователем элементы div будут реагировать только на наведение мыши, когда я помещаю указатель мыши непосредственно на границу в 1 пиксель.Это происходит только в IE.

1 Ответ

3 голосов
/ 28 февраля 2012

Проблема была решена добавлением прозрачных 100% ширины 1 x 1 x 100% высоты png на элементы div. По-видимому, IE не распознает элементы div как элементы с наведением на них, если внутри элемента div нет содержимого.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...