Wu Yuxiong - born nature study notes HTML: HTML framework

By using frames, you can display more than one page in the same browser window.
Syntax iframe: 

< iframe src = "URL" > </ iframe > 
The URL points to a different page. 

Iframe - set the height and width of the 
height and width define a height to width for iframe tags. 

The default attribute in pixels, but you can specify to scale (such as: "80%"). 

Examples 
< iframes the src = "demo_iframe.htm" width = "200 is" height = "200 is" > </ iframes >
<! DOCTYPE HTML > 
< HTML > 
< head >  
< Meta charset = "UTF-. 8" >  
< title > novice tutorial (runoob.com) </ title >  
</ head >  
< body > 

< iframes the src = "demo_iframe.htm " width =" 200 " height =" 200 " > </ iframes. > 

< the p- > Some older browsers do not support iframe. </ P > 
< the p- > If your browser does not support iframes will not be displayed. </p>


</body>
</html>

 

 

Iframe - remove border 
frameborder attribute is used to define iframe indicating whether border. 

Set attribute value of "0" to remove border iframe: 

Example 
< iframe the src = "demo_iframe.htm" frameborder = "0" > </ iframe >
<! DOCTYPE HTML > 
< HTML > 
< head >  
< Meta charset = "UTF-. 8" >  
< title > novice tutorial (runoob.com) </ title >  
</ head >  
< body > 

< iframes the src = "demo_iframe.htm " width =" 200 " height =" 200 " frameborder =" 0 " > 
 < the p- > your browser does not support the iframe tag. </ P > 
<

>
</html>

 

 

Using iframe to display the target link page 
iframe may display a page of a link target 

link target attributes must iframe attributes, the following examples: 

Example 
< iframe the src = "demo_iframe.htm" name = "iframe_a" > </ iframe > 
< P > < A the href = "http://www.runoob.com" target = "iframe_a" > RUNOOB.COM </ A > </ P >
<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>菜鸟教程(runoob.com)</title> 
</head> 
<body>

<iframe src="demo_iframe.htm" name="iframe_a"></iframe>
<p><a href="//www.runoob.com" target="iframe_a">RUNOOB.COM</a></the p- > 

< the p- > < b > Note: </ b > because the target attribute a label is named iframe_a iframe framework, so when you click on the link page is displayed in the iframe frame. </ P > 

</ body > 
</ HTML >

 

 

Guess you like

Origin www.cnblogs.com/tszr/p/11997210.html