【问题标题】:CSS Sprites disappear on mobile devices and tablets after click点击后 CSS Sprites 在移动设备和平板电脑上消失
【发布时间】:2012-06-26 08:48:44
【问题描述】:

我创建了一个不错的 joomla 网站,其精灵导航在 PC 上运行良好,但在移动设备和平板电脑上存在一些问题:在我“触摸”链接后,背景图像消失了......我该如何解决这个问题?

请看http://www.kartika.eu/index.php?option=com_content&view=category&layout=blog&id=15&Itemid=239&lang=en

这是我的 CSS 示例:

#brands_menu   {
  margin: auto;
}
.tab td {
  display: inline-block;
  height: 153px;
  width: 153px;
  border: none;
}
a.license1:link {
  display:block;
  width:153px;
  height:153px;
  text-indent:-9999px;
  background:url(../images/sprite.png) 0px 0px no-repeat;
  float: left;
  border: none;
}
a.license1:hover {
  display:block;
  width:153px;
  height:153px;
  text-indent:-9999px;
  background:url(../images/sprite.png) 0px -153px no-repeat;
  float: left;
  border: none;

}

【问题讨论】:

    标签: joomla tablet css-sprites


    【解决方案1】:

    我自己修!我只需将此代码添加到我的 css 中,问题就解决了

    a.license1 {
      display:block;
      width:153px;
      height:153px;
      text-indent:-9999px;
      background:url(../images/sprite.png) 0px 0px no-repeat;
      float: left;
      border: none;
    }
    

    它并不完美,但它确实有效

    【讨论】:

      猜你喜欢
      • 2018-07-19
      • 1970-01-01
      • 1970-01-01
      • 2012-11-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-06-26
      相关资源
      最近更新 更多