我有一个iframe,我正在使用来自emailmeform.com,我想要做的是让iframe(表单)的内容在iframe中"裁剪",以便从某个点开始.
这样做的原因是他们给你的iframe在顶部有一定的空间,这使我的网页看起来很乱.我希望更高的形式,以便我可以缩小我的iframe和我的文本之间的差距
我使用stackoverflow.com作为模拟iframe内容,因为我使用的表单有个人信息:
<iframe height="1258" allowtransparency="true" frameborder="0" scrolling="no" style="width:100%; border:none" src="http://stackoverflow.com/">
<a href=
"http://stackoverflow.com/">Fill out form.</a></iframe>
Run Code Online (Sandbox Code Playgroud)
style像这样向iframe 添加属性
<iframe src="blahblab" style="position:relative; top:-200px;"></iframe>
Run Code Online (Sandbox Code Playgroud)
然后您的iframe内容将以200px偏移顶部显示内容.