1

I am using bootstrap in my markup . My mark is simple , it looks like this

   <div class="col-md-5 col-xs-8 col-xs-offset-2  col-md-offset-1 logo">
        <a href="www.google.com">
                        <img src="images/new/header_logo.png" alt="Test"/>            
        </a>
   </div>

It works fine in desktop , when I click to the image it takes me to google.com . But it doesn't work on responsive view . In responsive view if I click on the image it does nothing .

I have also tried like this

<div class="col-md-5 col-xs-8 col-xs-offset-2  col-md-offset-1 logo">
  <a href="www.google.com">
    <img src=images/new/header_logo.png" alt="Test" usemap="#maptest"/> 
  </a>
</div>
<map name="maptest">
  <area shape="rect" coords="0,0,128,128" href="www.google.com" alt="Test"/>
</map>

Also I have checked the following stackoverflow question , it doesn't solve my problem

Image link on iPhone is not clickable

4

1 回答 1

2

我找到了我的问题的解决方案,我将 z-index 添加到要单击的元素中

   <div class="col-md-5 col-xs-8 col-xs-offset-2  col-md-offset-1 logo">
        <a href="www.google.com">
                        <img src="images/new/header_logo.png" alt="Test"/>            
        </a>
   </div>

.logo {
   z-index:99999;
}
于 2015-04-20T06:40:30.707 回答