简体   繁体   English

Chrome 开发者工具没有显示响应

[英]Chrome Developer Tool is not showing responsiveness

I am having issues while checking responsiveness of my website on chrome developer tool.我在 chrome 开发者工具上检查我的网站的响应时遇到问题。 When I resize my chrome window, It shows responsivness当我调整我的 chrome window 的大小时,它显示出响应性

In the following image chrome window width is 768px在下图中,chrome window 宽度为 768px

调整窗口图像大小

But when I use Toggle Device Toolbar in chrome it does not show responsiveness as in the following image.但是当我在 chrome 中使用Toggle Device Toolbar时,它不会显示如下图所示的响应能力。 The width is 768px.宽度为 768 像素。

开发工具

My index.html file is as follows我的index.html文件如下

<!DOCTYPE html>
<html>
<head>
    <title>Personal Site</title>
    <link rel="stylesheet" type="text/css" href="./styles/style.css">
    <link rel="stylesheet" type="text/css" href="./styles/tab.css">
    <link rel="stylesheet" type="text/css" href="./styles/mobile.css">
</head>
<body>
All the Code lies here
</body>
</html>

My CSS files are as follows我的 CSS 文件如下

style.css样式.css

All the styles are here no media queries

tab.css选项卡.css

@media only screen and (max-width: 768px) and (min-width: 501px)
{
All the styles are here
}

mobile.css手机.css

@media only screen and (max-width: 500px)
{
All the styles are here
}

You are missing the Viewport tag in your head,您在脑海中缺少 Viewport 标签,

Add this to your head tag将此添加到您的head标签

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

Please visit this Document for more information请访问此文档以获取更多信息

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 chrome开发人员工具源代码 - chrome developer tool source code Requests.get显示与Chrome的开发者工具不同的HTML - Requests.get showing different HTML than Chrome's Developer Tool Chrome web 开发者工具更改屏幕分辨率 - Chrome web developer tool changes screen resolutions 未捕获的TypeError:$(…).sidr不是函数[控制台Chrome开发者工具] - Uncaught TypeError: $(…).sidr is not a function[Console Chrome developer tool] Web抓取:Chrome开发人员工具可看到html结构,但htmlTreeParse(R)无法看到 - Web scraping: html structure visible with chrome developer tool, but not with htmlTreeParse (R) 为什么Chrome开发者工具会添加文件中未包含的元素? - Why does Chrome Developer Tool add elements not in the file? 查看Source和Chrome Developer Tools显示不同的输出 - View Source and Chrome Developer Tools showing different output 如何在AngularJS上下文中使用Google Chrome开发者工具在HTML代码中设置断点? - How to set a breakpoint in HTML-code with Google Chrome Developer Tool in the context of AngularJS? 如何访问值<function scope>在 Chrome 开发者工具的观察面板中关闭? - How to access values from <function scope>'s Closure in Chrome Developer tool's Watch panel? 在Chrome检查器开发人员工具(“检查器样式表”)中添加新的空白样式表的最快方法 - Fastest way to add a new blank stylesheet in Chrome's inspector developer tool (“Inspector stylesheet”)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM