[英]Viewport not working with nodejs web server
I have a nodejs web server running on a Raspberry Pi 3 B+ that's working well except the viewport is being ignored on iOS and Android mobile devices using a Chromium or Safari browser. 我的標簽之間的視口元標簽看起來像:
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Web 頁面正在使用似乎是 nodejs 的典型方式提供服務,代碼如下:
fs.readFile(__dirname + '/public/' + url, function(err, data) {
if (err) {
res.writeHead(404, {'Content-Type': 'text/html'}); //display 404 on error
return res.end("404 Not Found");
}
res.writeHead(200, {'Content-Type': 'text/html'});
res.write(data);
return res.end();
});
無論我將比例更改為什么,它都不會改變顯示,在移動設備上一切都是微小的。 我做錯了什么?...還是不做?
I have a nodejs web server running on a Raspberry Pi 3 B+ that's working well except the viewport is being ignored on iOS and Android mobile devices using a Chromium or Safari browser. 我的標簽之間的視口元標簽看起來像:
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Web 頁面正在使用似乎是 nodejs 的典型方式提供服務,代碼如下:
fs.readFile(__dirname + '/public/' + url, function(err, data) {
if (err) {
res.writeHead(404, {'Content-Type': 'text/html'}); //display 404 on error
return res.end("404 Not Found");
}
res.writeHead(200, {'Content-Type': 'text/html'});
res.write(data);
return res.end();
});
無論我將比例更改為什么,它都不會改變顯示,在移動設備上一切都是微小的。 我做錯了什么?...還是不做?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.