【问题标题】:Image Links not working on Mobile Devices图片链接在移动设备上不起作用
【发布时间】:2015-09-19 23:50:27
【问题描述】:

我正在尝试在我的网站上获取一些非常基本的社交链接。我正在使用 Twitters 引导程序以及一些自定义 CSS。

移动图像(带链接)在台式机上运行良好,但在桌面或移动设备上测试时,我无法单击它。

这里是有问题的代码:http://codepen.io/anon/pen/avZOor

.body {
  background-color: #105b74;
}
.header {
  padding: 0.5em;
  padding-right: 3em;
  float: right;
  font-size: 11pt;
  text-shadow: 1px 1px rgba(0, 0, 0, .3);
}
.header ul li {
  float: left;
  margin: 0 0 0 0.5em
}
<div class="header">
  <ul class="nav">
    <li>
      <a href="http://fb.com/redacted">
        <img src="http://imgur.com/BJbloCr.png" alt="Facebook Link" style="width: 30px; height: 30px;">
      </a>
    </li>
    <li>
      <a href="http://twitter.com/redacted">
        <img src="http://imgur.com/mOlTDAi.png" alt="Twitter Link" style="width: 30px; height: 30px;">
      </a>
    </li>
    <li>
      <a href="https://plus.google.com/u/0/redacted">
        <img src="http://imgur.com/MxqUrM2.png" alt="Google+" style="width: 30px; height: 30px;">
      </a>
    </li>
    <li>
      <a href="http://redacted.com/contact">
        <img src="http://imgur.com/WQyMo7e.png" alt="Contact Page Link" style="width: 30px; height: 30px;">
      </a>
    </li>
  </ul>
</div>

【问题讨论】:

  • 不确定。我在我的 android 设备上测试了你的代码笔示例,它可以正常工作
  • 在 Android Lollipop 中运行良好。
  • 在安卓上运行良好!!!
  • 似乎重复:stackoverflow.com/questions/11282367/…>

标签: html css twitter-bootstrap mobile


【解决方案1】:

我遇到了同样的问题,我从 css 文件中删除了 float 指令并且它工作了

【讨论】:

  • 这不是一项义务,但添加一个 jsFiddle(或类似的东西)总是很高兴能快速看到你的更改结果。此外,明确你所做的更改也很好!
猜你喜欢
  • 2018-11-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多