[英]show mobile website inside a desktop website
Hi I would like show a mobile version website in my website on a desktop computer, how I can do it? 嗨,我想在台式机上的网站上显示一个移动版本的网站,我该怎么做?
I was thinking using an iframe, but they show me the desktop version inside the iframe. 我当时在考虑使用iframe,但是它们向我展示了iframe内的桌面版本。
I tried to change the user-agent of the iframe but doesn't work for me (maybe is possible) 我试图更改iframe的用户代理,但对我不起作用(也许是可能的)
(for instance you can try https://www.linguee.it/ ) Thanks (例如,您可以尝试https://www.linguee.it/ )谢谢
here you can see the problem <iframe src="https://codepen.io" id="frame_1"></iframe>
https://codepen.io/orlandoangular/pen/qQXPob 在这里您可以看到问题
<iframe src="https://codepen.io" id="frame_1"></iframe>
https://codepen.io/orlandoangular/pen/qQXPob
Add view port in header section like this: 在标头部分添加查看端口,如下所示:
<meta name="viewport" content="width=device-width, initial-scale=1">
Use Media Query in your css like this: 像这样在CSS中使用Media Query:
body {
background-color: pink;
}
@media screen and (max-width: 480px) {
body {
background-color: lightgreen;
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.