Javascript 如何停止桌面/平板电脑上的“电话号码”链接
这一定很常见。。。。我很抱歉,但在这里找不到有效的解决方案 我正在改造一个网站,它有响应CSS,例如:Javascript 如何停止桌面/平板电脑上的“电话号码”链接,javascript,css,mobile,user-agent,Javascript,Css,Mobile,User Agent,这一定很常见。。。。我很抱歉,但在这里找不到有效的解决方案 我正在改造一个网站,它有响应CSS,例如: /* Refecence from responsive.css /* crank up to 5000px to support high res monitors and TV's */ @media only screen and (min-width: 1200px) and (max-width: 5000px) /* Portrait tablet to landscape an
/* Refecence from responsive.css
/* crank up to 5000px to support high res monitors and TV's */
@media only screen and (min-width: 1200px) and (max-width: 5000px)
/* Portrait tablet to landscape and desktop - BROWSER SIZE 2 */
@media only screen and (min-width: 991px) and (max-width: 1200px)
/* Landscape phone to portrait tablet - BROWSER SIZE 3 */
@media only screen and (min-width: 767px) and (max-width: 991px)
/* All Mobile Sizes (devices and browser) - BROWSER SIZE 4 */
@media only screen and (max-width: 767px)
/* Landscape phones and down - BROWSER SIZE 5 */
@media (max-width: 480px)
/* iphone portrait mode - BROWSER SIZE 6 */
@media (max-width: 320px)
我是新手,做了很多研究,但我有几个问题:
我计划有两个HTML块,一个隐藏,并根据用户是否在移动设备上使用JS或CSS来隐藏相应的块
我希望避免使用useragent,因为有太多了。默认情况下,Android不再像其他帖子那样解析没有“tel:”的数字。我在Nexus5上测试过。另一方面,Firefox要求设备在“tel:”链接上使用
我可以使用当前的@media CSS块吗?如果是,视网膜呢?
或者基于用户代理的JS是否可以?
其他选择,我的意思是大多数人都做什么???
非常感谢您的帮助。经过进一步研究,我决定使用Javascript库iMobile 似乎很多人都在使用它,所以我认为它会起作用 我担心的是,如果有新设备出现,我必须不断更新这个库