我经常在我的网站上使用 abbr(以前是首字母缩写词)标签。但我注意到此标签不适用于移动/平板设备(触摸设备)。所以我的问题是:我怎样才能让它发挥作用?
我在互联网上搜索了一些解决方案,但它们并不完全有用:
解决方案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')); }); }); }
没有一个是完全令人满意的!因此,非常感谢一些替代方案!