1

I made a transparent button:

.home-btn-left {
  position: fixed;
  left: 20px;
  top: 20px;
  background-color: transparent;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
<a class="home-btn-left" onclick="plusDivs(-1)">❮</a>

It doesn't have a hover, focus or active state. But when I push it on my iphone I see this and I really don't wanna have it:

enter image description here

Do you have some suggestion?

https://jsfiddle.net/3bfptxty/

Nhan
  • 3,595
  • 6
  • 30
  • 38

1 Answers1

1

First off, you should apply the styles for every state of the <a> element using:

.home-btn-left,.home-btn-left:hover,
.home-btn-left:active, .home-btn-left:focus { /* your styles */ }

then you should add the otline property, to prevent dotted outline or similar behaviours

outline: 0;

Edit: on more digging you might be searching for -webkit-tap-highlight-color, like described here

Community
  • 1
  • 1
Giovazz89
  • 391
  • 3
  • 12