不必要的跳跃'悬停时出错

时间:2017-11-30 04:40:35

标签: html css

我正在写一个简单的导航,有6个盒子并排排列在2列中。悬停时,框显示黄色边框。出于某种原因,当我将鼠标悬停在第一个方框上时,其他方框会跳过'。这只发生在IE中。 这是我的代码:



img.thumbImage {
  float: left;
  width: 100%;
  max-width: 100px;
  height: auto;
  margin-right: 30px;
}

a .listing {
  background-color: #ffffff;
  padding: 10px;
  width: 48%;
  float: left;
  padding-right: 80px;
  color: #000;
  border: transparent solid 10px;
  margin-bottom: 20px;
  background-size: 30px;
  margin-right: 2%;
  height: 150px;
  display: block;
}

a:hover .listing {
  border: 10px solid #ffe800 !important;
  -webkit-transition: all 0.5s ease;
  -moz-transition: all 0.5s ease;
  -o-transition: all 0.5s ease;
  -ms-transition: all 0.5s ease;
  transition: all 0.5s ease;
  height: 150px;
  display: block;
}

a:hover .listing h3 {
  color: #ffe800 !important;
}

.listing h3 {
  margin-top: -24px;
}

<a href="#">
  <div class="listing">
    <img src="#" class="thumbImage" />
    <h3>TITLE</h3>
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et leo ut nulla viverra hendrerit sit amet.
  </div>
</a>
<a href="#">
  <div class="listing">
    <img src="#" class="thumbImage" />
    <h3>TITLE</h3>
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et leo ut nulla viverra hendrerit sit amet.
  </div>
</a>
<a href="#">
  <div class="listing">
    <img src="#" class="thumbImage" />
    <h3>TITLE</h3>
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et leo ut nulla viverra hendrerit sit amet.
  </div>
</a>
<a href="#">
  <div class="listing">
    <img src="#" class="thumbImage" />
    <h3>TITLE</h3>
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et leo ut nulla viverra hendrerit sit amet.
  </div>
</a>
<a href="#">
  <div class="listing">
    <img src="#" class="thumbImage" />
    <h3>TITLE</h3>
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et leo ut nulla viverra hendrerit sit amet.
  </div>
</a>
<a href="#">
  <div class="listing">
    <img src="#" class="thumbImage" />
    <h3>TITLE</h3>
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et leo ut nulla viverra hendrerit sit amet.
  </div>
</a>
&#13;
&#13;
&#13;

不幸的是,我受限于WordPress,所以没有脚本的回复将不胜感激。 在悬停屏幕截图之前

enter image description here

悬停屏幕截图后 enter image description here

0 个答案:

没有答案