<!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>
&#13;
我正在努力开发一个快速响应的网站。但我的网站不支持手机。
<meta name="viewport" content="width=device-width, initial-scale=1.0">
我使用上面的标签响应网站。但这不起作用。
请帮帮我
答案 0 :(得分:0)
响应式设计是您必须使用css手动完成的事情。您不能简单地添加元标记,并且您的页面会响应;) 对于上面的代码示例,您可以像这样内联:
<img style="max-width:100%" src="sample-content/running-sml.jpg?full=sample-content/running-lrg.jpg" />
但当然你应该为你的网站创建一个样式表文件。