单击后,CSS Sprites会在移动设备和平板电脑上消失

时间:2012-06-26 08:48:44

标签: joomla tablet css-sprites

我创建了一个精美的joomla网站,其精灵导航在PC上工作正常,但在移动设备和平板电脑上有一些问题:在我“触摸”链接背景图像消失后......我该如何解决这个问题? / p>

请参阅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;

}

1 个答案:

答案 0 :(得分:5)

我自己解决了!我只需要将此代码添加到我的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;
}

它不完美但它有效