O
O
Onatsky2016-11-25 02:35:31
css
Onatsky, 2016-11-25 02:35:31

How can I disable block highlighting when clicked?

Good day!
There is a block with the following properties:

#block {
width: 100px;
height: 100px;
position: relative;
}
#block:active {
top: 10px;
}

If you click on this block in a mobile browser, it is fully highlighted in blue, supposedly a click. From the question: how to remove this backlight? I tried to write onselectstart="return false;" - didn't work out. Registered property "user-select: none;" - didn't help either.
Help please, how to solve this problem? It is necessary that the block does not turn blue when pressed. Thanks in advance!)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Rafael™, 2016-11-25
@Onatsky

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

A
Anton, 2016-11-25
@SPAHI4

Try
pointer-events: none

Y
yumakaev, 2016-11-25
@yumakaev

Can I have some more:
box-shadow: none;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question