【问题标题】:why my web site don't supported in mobile phone为什么手机不支持我的网站
【发布时间】:2017-10-19 18:51:36
【问题描述】:

<!DOCTYPE html>
<html>
<head>
	<title>Responsive Images Test Page</title>
</head>
<body> 

	<h1>Responsive Images Test Page</h1>
	<p>In supported browsers, the following image will load either small or large version depending on screen resolution, making a single 1kb request before requesting the appropriate size.</p>

	<img src="sample-content/running-sml.jpg?full=sample-content/running-lrg.jpg" />

	<p id="cred"><strong>Photo credit (CC):</strong> Cia de Foto <a href="http://www.flickr.com/photos/ciadefoto/3192757134/in/pool-809956@N25/">Flickr Creative Commons</a></p>
	
</body>
</html>

我正在尝试开发一个响应式网站。但我的网站不支持手机。 &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt; 我将上述标签用于响应式网站。但这不起作用。 请帮帮我

【问题讨论】:

  • 哪款手机?全部?
  • 如果您不向我们展示任何代码,我们将无法帮助您。
  • 最好是分享到该网站的链接。
  • 寻求调试帮助的问题(“为什么这段代码不起作用?”)必须包括所需的行为、特定的问题或错误以及重现它所需的最短代码在问题本身。没有明确的问题陈述的问题对其他读者没有用处。请参阅:How to create a Minimal, Complete, and Verifiable example
  • 在你的手机中,确定没有选择桌面版?

标签: javascript jquery html css


【解决方案1】:

响应式设计是您必须手动使用 css 完成的事情。您不能简单地添加元标记并且您的页面是响应式的;) 对于上面的代码示例,您可以像这样内联:

<img style="max-width:100%" src="sample-content/running-sml.jpg?full=sample-content/running-lrg.jpg" />

当然,您应该为您的网站创建一个样式表文件。

【讨论】:

    猜你喜欢
    • 2011-01-05
    • 2016-09-28
    • 2017-11-07
    • 2017-07-03
    • 1970-01-01
    • 2021-03-21
    • 1970-01-01
    • 2012-11-07
    • 2018-10-30
    相关资源
    最近更新 更多