1
我想顯示一個div只有當用戶在SPEED MODE中使用uc mini瀏覽器(它在maxfunzone.com中完成的方式)。以下是我的標記。對此主題的任何幫助都非常重要。如何在UC Mini Browser的Speed模式下播放div?
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>UC Mini</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
if (navigator.userAgent.match(/^Mozilla\/5\.0 .+ Gecko\/$/)) {
$(".info-box").show();
}
else {
$(".info-box").hide();
}
});
</script>
<style>
.info-box{display: none}
</style>
</head>
<body>
<div class="info-box">
some text here
</div>
</body>
</html>
你爲什麼要這麼做? :) – xFighter
因爲頁面deasign在uc迷你速度模式下打破。 ;) –
如果UC迷你速度不打破你的佈局,那麼我會說,UC速度模式有錯誤或沒有適當實施。爲什麼?這是因爲速度模式必須優化頁面中的佈局,緩存,圖像,樣式表,js文件和其他內容以使用戶可以使用該速度模式。這只是一種以標準方式更快加載內容的方式,但是您錯誤地理解了這個想法。 希望這有助於 – xFighter