iframe例子 (

iframe例子

 

test1.htm

<html>
    <body background="test.jpg" >
        <iframe src="test2.htm" id="tag" name="tag" allowTransparency="true" width="250"   height="200" scrolling="no" frameborder="0">
        </iframe>

        <iframe src="test3.htm" id="test3" allowTransparency="true" width="450" height="200" scrolling="no" frameborder="0">
        </iframe>

    </body>
</html>

 

test2.htm

<html> 
   <body style="BACKGROUND-COLOR:transparent;"> 
          <table width="50" height="20">
         <tr><td>1</td></tr>
             <tr><td>2</td></tr>
          </table>
   </body> 
</html> 

 

test3.htm

<html> 
   <body style="BACKGROUND-COLOR:transparent;"> 
          <table width="50" height="20">
          <tr><td>test1</td></tr>
              <tr><td>test2</td></tr>
          </table>
   </body> 
</html> 

 

iframe属性
 

SRC=URI 嵌入式柜架的页面文件路径
NAME=CDATA 嵌入式柜架的名字 
LONGDESC=URI 描述
WIDTH=Length 宽度
HEIGHT=Length 高度
ALIGN=[ top | middle | bottom | left | right ] 


对齐方式
FRAMEBORDER=[ 1 | 0 ] 柜架边框 
MARGINWIDTH=Pixels 左右空出宽度 
MARGINHEIGHT=Pixels 上下空出的高度 
SCROLLING=[ yes | no | auto ] 流动条(yes强制显示|no永不显示|auto自动)

 

iframe 透明

allowTransparency="true"

style="BACKGROUND-COLOR:transparent;"

 

 
Iframe标记的使用格式是:
<Iframe src="URL" width="x" height="x" scrolling="[OPTION]" frameborder="x" name="main"></iframe>
src:文件的路径,既可是HTML文件,也可以是文本、ASP等;
width、height:"内部框架"区域的宽与高;
scrolling:当SRC的指定的HTML文件在指定的区域不显不完时,滚动选项,如果设置为NO,则不出现滚动条;如为 Auto:则自动出现滚动条;如为Yes,则显示;
FrameBorder:区域边框的宽度,为了让“内部框架“与邻近的内容相融合,常设置为0。
name:框架的名字,用来进行识别。

猜你喜欢

转载自blog.csdn.net/qq_32444825/article/details/80344581