我正在使用下面的代码但是当点击灰盒子时,文本/图像会显示为隐藏。我正在尝试其他方式,但问题没有解决。任何人都可以帮助我,我将不胜感激。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=no;user-scalable=0;"/>
<style>
*{-webkit-tap-highlight-color:#eaeaea; -tap-highlight-color:#eaeaea; -moz-tap-highlight-color:#eaeaea; -webkit-appearance:none;}
.brands ul{ margin:0; padding:0; float:left; width:100%;}
.brands ul li{ width:50%; list-style:none; margin:0; padding:1px; float:left; box-sizing:border-box; -moz-box-sizing:border-box; -webkit-box-sizing:border-box; }
.brands ul li div{ float:left; width:100%; position:relative;}
.brands ul li div a{background:#f6f6f6; min-height:60px; text-align:center; display:block; height: 70px; overflow: hidden; float:left; width:100%; position:relative; cursor:pointer; }
</style>
</head>
<body>
<div class="brands">
<ul>
<li><div><a>Test</a></div></li>
<li><div><a>Test</a></div></li>
<li><div><a>Test</a></div></li>
<li><div><a>Test</a></div></li>
<li><div><a>Test</a></div></li>
<li><div><a>Test</a></div></li>
</ul>
</div>
</body>
</html>
答案 0 :(得分:0)
问题解决了。我使用rgba颜色代码而不是短颜色代码
* { -webkit-tap-highlight-color:rgba(0,0,0,0.1);
-tap-highlight-color:rgba(0,0,0,0.1);
-moz-tap-highlight-color:rgba(0,0,0,0.1);
-webkit-appearance:none;
}