gpt4 book ai didi

android - 如何启用放大元标记?

转载 作者:太空宇宙 更新时间:2023-11-04 08:23:23 26 4
gpt4 key购买 nike

我正在开发一个也可以在手机上运行的 node.js 应用程序。但是在某些手机上它没有缩放可能是什么原因?

该页面的元标记是

<meta name="HandheldFriendly" content="true"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">

这是我要添加捏合缩放的页面。我添加的元标记属于 index.html,它是我的应用程序的父页面。那么主要原因可能是什么?

<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="icon" href="favicon.ico">
<script src="samples.js"></script>
<title>Chart.js samples</title>
</head>
<body>
<div class="content">
<div class="header">
<div class="chartjs-title">Samples</div>
<div class="chartjs-caption">Simple yet flexible JavaScript charting for designers &amp; developers</div>
<div class="chartjs-links">
<a class="btn btn-chartjs" href="http://www.chartjs.org">Website</a>
<a class="btn btn-docs" href="http://www.chartjs.org/docs">Documentation</a>
<a class="btn btn-gh" href="https://github.com/chartjs/Chart.js">GitHub</a>
</div>
</div>

<div id="categories" class="samples-categories"></div>
</div>

<script>
function createCategory(item) {
var el = document.createElement('div');
el.className = 'samples-category';
el.innerHTML =
'<div class="title">' + item.title + '</div>' +
'<div class="items"></div>';
return el;
}

function createEntry(item) {
var el = document.createElement('div');
el.className = 'samples-entry';
el.innerHTML = '<a class="title" href="' + item.path + '">' + item.title + '</a>';
return el;
}

var categories = document.getElementById('categories');
Samples.items.forEach(function(item) {
var category = createCategory(item);
var children = category.getElementsByClassName('items')[0];

(item.items || []).forEach(function(item) {
children.appendChild(createEntry(item));
});

categories.appendChild(category);
});
</script>
</body>
</html>

最佳答案

<meta name="viewport" content="width=device-width, initial-scale=1">

关于android - 如何启用放大元标记?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45367658/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com