Frame page has frame, Iframe, Frameset 3 marks, beginners easy to confuse the three, the following respectively explain the difference between the three.
The difference between 10.4.1 frameset and frame
First, explain the difference between frameset and frame.
<Frameset></Frameset> is used to divide the frame, each frame by <Frame></Frame> tag. <Frame></Frame> must be used within <Frameset></Frameset>, the code is as follows:
<FRAMESET border=1 frameSpacing=1 borderColor=#47478d rows=* cols=180,*>
<FRAME src="inc/admin_left.htm" name=left scrolling=no id="left">
<FRAME src="inc/admin_center.htm" name=main scrolling="no">
</FRAMESET>
In the above example,<frameset></frameset> the page is divided into about two parts, the left frame of the page is admin_left.htm, the right frame of the page is admin_center.htm.
Note the frame order of the:<frame></frame> tag is left-to-right or from top to bottom.
The difference between the two is as follows:
<Frameset> for the frame tag, describe the Web page document as a frame, and set the layout of the frame in the document that makes up the frame set.
<Frame> sets the properties that make up each frame in the frameset.
10.4.2 Frameset Parameter setting
<Frameset> need to set some specific parameters, which directly determine the layout of the entire page, the code is as follows:
<frameset border=1 framespacing=1 bordercolor= #47478d rows=* cols=180,*>
The various parameter settings for the previous code and their meanings are shown in table 10.3.
Table 10.3 Frameset Parameters
Parameters |
Description |
Border |
Sets the border thickness of the frame, in pixels |
Frameborder |
Sets whether the frame is displayed, 0 is not displayed, and 1 is displayed |
Framespacing |
Represents the distance between a frame and a frame |
BorderColor |
Set the border color of a frame |
Row |
The document is divided into the upper and lower frames, row values can be a value or a percentage, * represents the rest of the space, the number of numbers represents the level of the number of frames, such as rows= "210,*,10%", said that the page is divided into the next three frames page, the top frame occupies 210px, The bottom frame occupies 10% of the entire document, and the remaining space is occupied by the middle frame. * is a relative concept, such as row=*, that represents a frame layout with no upper and lower structure in the page |
Cols |
Set the same row |
10.4.3 Frame parameter setting
For the setting of the frame parameter, the code is as follows:
<frame name="left" src=" index_manager/admin_left.htm " marginwidth="1" marginheight="1" scrolling="no" frameborder="1" noresize framespacing="2" bordercolor="#cc0000">
Each parameter setting of the previous code and its meaning
As shown in Table 10.4.
Table 10.4 Frame Parameters
Parameters |
Description |
Name |
Set the name of the frame to be in English |
Src |
Sets the page path and name displayed in the frame, which can be a relative path or an absolute path |
Marginwidth |
Indicates the distance between the frame and the left and right edges |
Marginheight |
Indicates the distance between the frame and the top and bottom edges |
Scrollling |
Sets whether scroll bars are displayed in frames, yes is displayed, no is not displayed, and auto means scroll bars are automatically displayed when content in frames page exceeds the frame in large hours |
Frameborder |
Sets whether frame borders are displayed, 0 is not displayed, 1 is displayed |
Noresize |
Set whether the user can change the size of the frame, do not set this allows the viewer to arbitrarily pull the frame, change the size of the frame |
Framespacing |
Represents the distance between a frame and a frame |
BorderColor |
Set the border color of a frame |