【问题标题】:Blue overlay of OnClickOnClick 的蓝色叠加层
【发布时间】:2012-12-16 10:38:19
【问题描述】:

当我在 Android WebView 中显示一个 html 页面时,单击的元素上总是有一个蓝色覆盖层,该覆盖层具有一个 href 或一个 javascript 函数挂钩。如何摆脱这个蓝色覆盖层?

源代码

<html>
    <head>
    <title>Blue Overlay</title>
    <style>
    *{margin:0;padding:0;/* get rid of the default 2 pixels margin */
    } 
    body{background-color: #000000;}

    /* button-related CSS */
    a.button{
        background: url("img/icon_bt.png") no-repeat scroll center center transparent;
        display: block;
        text-decoration: none;/*remove the blue underline*/
        width: 70px;
        height: 70px;
        margin: 50px;
    }
    a.button:active{
        background-image: url("img/icon_bt_pressed.png");
    }

    </style>
</head>
<body>
    <a class="button" href="#"></a>
    </body>
</html> 

【问题讨论】:

标签: javascript android html webview


【解决方案1】:

tried it 使用了不同的图像,它似乎有效。基本上,我只是添加了different topic 中的建议:

a:button {
    ...
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

【讨论】:

    【解决方案2】:

    我不确定,但也许图像有蓝色叠加层(不仅是链接和 a-tag)。所以摆脱它,即border: 0; ...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-07-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-04-19
      • 1970-01-01
      相关资源
      最近更新 更多