Android webview removes the blue border of the channel

When using webview in my application, every time I click on the link, a blue frame highlights the text or image. Is there any way to remove this feature from webview?

+3
source share
3 answers

This link may be useful to you.

+3
source

For reasons of accessibility, you should not just overlay the transparency color of the banner.

For elements where full control is required:

1.) Remove the highlight color from the backlight

.btn {
    ....

    -webkit-tap-highlight-color: transparent;
}

2.) Add new: active state (in this example, set the background color

.btn:active {
    background-color: rgba(100, 100, 100, 1.0);
}

3.) On some elements, for example, you can see the blue or orange border, this is just the focus state to remove the border:

.btn {
    ....
    -webkit-tap-highlight-color: transparent;
    outline: 0;
}

4.) :

.btn:focus {
    background-color: rgba(200, 200, 200, 1.0);
}

5.) : focus: active state

.btn:focus:active {
    background-color: rgba(150, 150, 150, 1.0);
}
+2

There was no 50 reputation to post a comment.
Blow is the main content from the link in the answer above.

    * {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);  
    }

rgba () is similar to rgb (), but opacity requires a 4th parameter.

0
source

All Articles