Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/87.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何获取滚动的网站的iframe_Javascript_Jquery_Html_Css_Iframe - Fatal编程技术网

Javascript 如何获取滚动的网站的iframe

Javascript 如何获取滚动的网站的iframe,javascript,jquery,html,css,iframe,Javascript,Jquery,Html,Css,Iframe,我一直在做一个项目,我必须得到一个网站的iframe,但当我得到iframe时,一切都变得一团糟 这是网站链接 这就是编码的内容 页面中缺少“DOCTYPE”并降低了iframe高度: <!DOCTYPE html> <html> <head> <title></title> </head> <body> <iframe scrolling="no" src="http://carclub.a

我一直在做一个项目,我必须得到一个网站的iframe,但当我得到iframe时,一切都变得一团糟 这是网站链接

这就是编码的内容


页面中缺少“DOCTYPE”并降低了iframe高度:

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
    <iframe scrolling="no" src="http://carclub.apexfour.com/" width="1349" 
    height="1200"></iframe>
</body>
</html>

硬编码的
宽度
高度
iframe
中的CSS冲突,这样会拉伸iframe,从而产生较大的空白。当你说:

“一切都搞砸了”

我想你是在谈论风格吧

尝试以下方法开始:

<!DOCTYPE html>
<head>
<title></title>
  <style>
    html, body {
      margin: 0;
      padding: 0;
      overflow-y: hidden;
      height: 100%;
    }
    iframe {
      width: 100%;
      height: 100%;
    }
  </style>
</head>
<body>
<iframe src="http://carclub.apexfour.com/"></iframe>
</body>
</html>

html,正文{
保证金:0;
填充:0;
溢出y:隐藏;
身高:100%;
}
iframe{
宽度:100%;
身高:100%;
}

你所说的混乱是什么意思?有什么问题?它完全适合我。