如果你有个域名和服务器,但是你又想要目标网站的内容,可以选择套壳,用html的iframe标签实现。
代码如下:
<!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="main.css"> <title>小辉网络工作室</title> <meta name="keywords" content="小辉网络工作室" /> <meta name="description" content="小辉网络工作室"> <link rel="shortcut icon" href="http://www.8gws.com/favicon.ico" type="image/x-icon"> <style> body { margin: 0; padding: 0; } #myiframe { width: 100%; height: 100vh; border: none; } </style> <script> function changeFrameHeight() { var ifm = document.getElementById("myiframe"); ifm.height = document.documentElement.clientHeight; } window.onresize = function() { changeFrameHeight(); }; </script> </head> <body> <iframe src="http://bbs.8gws.com" id="myiframe" scrolling="yes" onload="changeFrameHeight()" frameborder="0"></iframe> </body> </html>说明一下:以上代码实现,自动适配屏幕缩放。无边框,带滚动,自动适配目标网址的SSL.
再最下方的iframe src=后方替换自己的目标网址即可