2009-12-29 13 views

Respuesta

23

¿Está escribiendo para sitios web de iPhone/Smartphone? Si es así, entonces sí. Pero probablemente solo verá los resultados en su teléfono/simulador. Creo que este elemento solo se puede usar en enlaces o elementos de JavaScript. El div debería verse afectado por algún tipo de scripting, o ser un enlace.

http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariWebContent/AdjustingtheTextSize/AdjustingtheTextSize.html

<!DOCTYPE HTML> 
<html> 
    <head> 
    <title>Highlighting Elements</title> 
    <style type="text/css"> 
     .borderImage 
     { 
      -webkit-tap-highlight-color:rgba(0,0,0,0); 

     }  
     </style> 
    </head> 
<body> 
    <div class="borderImage"> 
    <a href="#"> 
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum non felis risus, tristique luctus lacus. Vestibulum non aliquam arcu. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent eleifend augue a ligula ornare quis lacinia risus ullamcorper. 
    </a> 
    </div> 
</body> 
</html> 
+0

ya lo sabía :) tal vez algún código, o un enlace a? – tarnfeld

+4

¡O día frabjous! Callooh! Callay! He estado buscando una manera de desactivar ese toque naranja maldito. Y ahí está. ¡Gracias! –

+0

¡Me alegra que haya encontrado esto útil! – tahdhaze09

4

que aplica esto a todos (*) de mis objetos HTML para mi iphone web-app.

Basta con añadir esto a su código CSS:

*{ 
/* Prevent any object from being highlighted upon touch event*/ 
-webkit-tap-highlight-color: rgba(0,0,0,0); } 

he usado jQuery Mobile para agregar y controlar los eventos touchstart y touchend a mis botones, que se encarga de la imagen de fondo de mis botones (en realidad estos son div s), por lo que parece que están presionadas en touchstart.

0

Esto debería funcionar:

-webkit-tap-highlight-color:transparent 
Cuestiones relacionadas