有没有一种方法只在安卓手机的UC浏览器中显示某些CSS规则?
请看这篇文章:CSS:用户代理选择器
基本上,当您使用此脚本时:
var b = document.documentElement;
b.setAttribute('data-useragent', navigator.userAgent);
b.setAttribute('data-platform', navigator.platform );
b.className += ((!!('ontouchstart' in window) || !!('onmsgesturechange' in window))?' touch':'');
html[data-useragent*='UCBrowser'] .someRules
{
visibility: visible;/* or display:block etc */
}