Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
388 views
in Technique[技术] by (71.8m points)

javascript - -webkit-tap-highlight-color: rgba(0,0,0,0); on a div?

Is there any way to apply this to a div?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Are you writing for iPhone/Smartphone websites? If so, then yes. But you'll probably only see the results on your phone/simulator. I think that this element can only be used on links or javascript elements. The div would have to be affected by some kind of scripting, or be a link.

https://developer.apple.com/library/content/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>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...