【发布时间】:2013-11-19 11:42:21
【问题描述】:
点击按钮后,其背景颜色会在短时间内变为半透明灰色。我想禁用此行为或自己设置颜色。
如果我没有设置背景颜色和图像,我不会太在意它:当颜色改变时,图像保持不变并且看起来很丑。
我试过 :active、:hover、:active:hover,但没有成功。 -webkit-tap-highlight-color 不适用于此处,因为它不是 Webkit 浏览器(但我已经尝试过......)。 这不是虚线轮廓的问题,我已经能够将其删除。
这里有一些代码供参考:
<style>
#that_button {
background: url(https://www.google.com/images/srpr/logo11w.png) 130px .3em no-repeat;
background-size: auto 1.5em;
background-color: #66ccff;
border: none;
height: 2em;
width: 200px;
}
</style>
<button id="that_button">Hello</button>
【问题讨论】:
-
你有代码给我们看看吗?
-
我添加了一个示例代码。
-
您在 Android 设备上的哪个浏览器上进行测试?