我经常在我的网站上使用缩写标签(以前是首字母缩写标签)。但我注意到这个标签在移动/平板设备(触摸设备)上无法正常工作。所以我的问题是:我该如何让它能够正常工作?
我在互联网上搜索了一些解决方案,但它们并不完全有用:
解决方案1:
abbr[title]:after
{
content: " (" attr(title) ")";
}
@media screen and (min-width: 1025px)
{
abbr[title]
{
border-bottom: 1px dashed #ADADAD;
cursor:help;
}
abbr[title]:after
{
content: "";
}
}
解决方案2:
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) { $('abbr').each(function() { $(this).click(function() { alert($(this).attr('title')); }); }); }
没有一个是完全令人满意的!因此,一些替代方案将不胜感激!