Frame is the knowledge that must be mastered in web development. For example, background architecture, local refresh, page segmentation, are the use of frame, especially the background page production, using frame will give users a very comfortable use of feelings. Frame knowledge points include (frameset tags, frame tags, iframe tags). Here's a description of it.
First, frameset
1. Properties
①border
Sets the border thickness of the frame. ②bordercolor sets the border color of the frame. ③frameborder sets whether frame borders are displayed. The set value is only 0, 1;0 means no border, and 1 indicates the border to be displayed. ④cols Portrait Split page. There are three types of numerical representations: "30%, 30 (or 30px), *", and the number of values represents the divided windows and the values are separated by ",". "30%" indicates that the frame area is 30% of the entire browser page area; "30" indicates that the area is 30 pixels wide and "*" indicates that the area occupies the remaining page space. For example: cols= "25%,200,*" means the page is divided into three parts, the left part of page 30%, the middle of the horizontal width of 200 pixels, the rest of the page as the right part. ⑤rows the horizontal split page. The numerical representation method and the meaning are the same as cols. ⑥framespacing sets the gap between the frame and the frame.
2. Use Cases
<frameset cols= "213,*" frameborder= "no" border= "0" framespacing= "0" >
Note 1:Cols and rows Two properties try not to use the same in a <frameset> tag. To implement the schema, the code is correctly worded as: <frameset rows= "59,*" cols= "*" frameborder= "no" border= "0" framespacing= "0" > <frame src= "???" Name= "Topframe" scrolling= "no" noresize= "noresize" id= "Topframe"/> <frameset cols= "213,*" frameborder= "no" Border= "0" framespacing= "0" > <frame src= "???" Name= "Leftframe" scrolling= "No" noresize= "noresize" id= "LeftFrame "/> <frame src="??? "Name=" MainFrame "id=" MainFrame "/>" That is, if you want to use cols and use rows, you can use frameset nesting implementation "
NOTE 2:<frameset cols= "40%,*,*" > means: The first frame occupies 40% of the entire browser window, and the remaining space is allocated evenly to the other two frames. <frameset cols= "*,*,*,*" > means: The browser window is divided into four parts.
Second, frame
1. Properties①name set the frame name. This is a property that must be set. ②SRC sets the name or path of the page to be displayed for this frame. This is a property that must be set. ③scrolling sets whether to display scroll bars. Set the value to auto, yes, No. ④bordercolor sets the border color of the frame. ⑤frameborder sets whether frame borders are displayed. The set value is only 0, 1;0 means no border, and 1 indicates the border to be displayed. ⑥noresize sets whether the frame size can be adjusted manually. ⑦marginwidth sets the width between the frame boundary and its contents. ⑧marginhight sets the height between the frame boundary and the content within it. ⑨width sets the frame width. ⑩height sets the frame height.
2. Use Cases<frame src= "???" Name= "Topframe" scrolling= "No" noresize= "noresize" marginwidth= "ten" marginhight= "ten" width= "400" Height= "/>"
Third, IFrameis a floating frame, its common properties are similar to frame, the other main has the following (the same is not listed)
1. Properties①align sets the vertical or horizontal alignment ②allowtransparency Sets or gets whether the object can be transparent.
2. Use Cases<iframe name= "123" align= "Middle" marginwidth= "0" marginheight=0 src= "???" frameborder= "0" scrolling= "no" width= " 776 "height=" 2500 "></iframe>
Note:The IFRAME tag is different from the verification method of frameset and frame tags, which is
XHTML 1.0 Transitional. And the IFRAME is placed inside the body tag, and frameset, frame is placed outside the body tag.
Iv. Comprehensive ExamplesOne
final point to note:If you write the code as I said above in VS, for example: or the workaround is as follows:
tools → options → text editor →html→ verify →internet Explorer 6.0Well, through the above content, we will be more practice, you'll slowly become familiar with the frame of the relevant knowledge, with good words you will find really good. As for the frame series of the event method of the label, the general use is not very much, if necessary, we check it yourself. "Oh, actually I have not used it"
Frameset Using Tutorials