开发者

HTML touchscreen increase text's "hit area" size?

I have to modify an HTML UI for a touchscreen system. A modif开发者_JS百科ication I have to do is to add a click handler to a certain text label inside a div tag. The text is fairly small.

So it will be hard to accurately hit it with the touchscreen. How can I increase the "hit area" of the text without increasing its size?


You can add padding to increase hit area of any link. Here is an example you can check-

<html>
  <body>
    <a href="#" style="font-size: 12pt; color: blue; padding: 20px 60px">This is a link</a>
  </body?
</html>

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜