The advantages of using Frameset in frameset tutorial. Frame is a required knowledge for web development. For example, the background architecture, partial refresh, and page segmentation are all used by frame, especially the advantages of Frameset
Frame is a required knowledge for web development. For example, the background architecture, partial refresh, and page segmentation are all used by frame, especially for background page creation. Using frame brings users a very comfortable experience. Frame knowledge points include (frameset tag, frame tag, iframe tag ). Next we will introduce them one by one.
I. frameset
1. attributes
① Border
Set the border width of the frame. ② Bordercolor: set the border color of the frame. ③ Frameborder: set whether to display the frame border. The set values are only 0 and 1. 0 indicates no border, and 1 indicates that the border is to be displayed. ④ Cols vertical split page. There are three numeric representation methods: 30%, 30 (or 30px), and *. the number of numeric values indicates the number of windows to be divided and the values are separated by commas. "30%" indicates that the frame area occupies 30% of all browser page areas; "30" indicates that the horizontal width of the area is 30 pixels; "*" indicates that the area occupies the remaining page space. For example, cols = "25%, 200, *" indicates that the page is divided into three parts, the left part occupies 30% of the page, the middle horizontal width is 200 pixels, and the remaining part of the page is the right part. ⑤ Rows splits the page horizontally. The numeric representation method has the same meaning as cols. ⑥ Framespacing sets the gap between the framework and the framework.
2. use cases
Note 1:Cols and rows attributes should not be the sameLabel. To implement the architecture, the code is written as follows: [That is, if you want to use cols and rows, you can use frameset nesting]
Note 2:The first frame accounts for 40% of the total browser window, and the remaining space is evenly allocated to the other two frames.The browser window is divided into four parts.
II. frame 1. attributes① Set the framework name. This is a required attribute. ② Src sets the webpage name or path to be displayed for this framework. This is a required attribute. ③ Scrolling sets whether to display the scroll bar. Set the value to auto, yes, no. ④ Bordercolor: set the border color of the frame. ⑤ Frameborder: set whether to display the frame border. The set values are only 0 and 1. 0 indicates no border, and 1 indicates that the border is to be displayed. ⑥ Noresize: set whether the frame size can be adjusted manually. 7. marginwidth: set the width between the frame boundary and the content. ⑧ Marginhight sets the height between the framework boundary and the content. Specify width to set the frame width. ⑩ Height sets the frame height.
2. use cases III. iframeIt is a floating frame. its common attributes are similar to those of a frame. other attributes are as follows (the same attributes are not listed)
1. attributes① Align sets the vertical or horizontal allowTransparency setting or obtains whether the object can be transparent.
2. use cases Note:The iframe label is different from the method used to verify the frameset and frame labels.
XHTML 1.0 Transitional. Iframe is placed in the body tag, while frameset and frame are placed outside the body tag. IV. Comprehensive examples Comprehensive example <Body> <p> Sorry, your browser does not support & ldquo; Framework & rdquo ;! </P> </body> [Description] Flag pairs are also placed inBetween sign pairs, used to display text or image information in browsers that do not support frames. Keep up with each otherSign pair before you can use any sign we are familiar.
Note the following:If an error is reported when the code is written to VS as described above, for example: or the solution is as follows:
Tools → Options → text editor → HTML → verification → Internet Explorer 6.0Now, with the above content, you will gradually become familiar with frame-related knowledge after more exercises. if you use it, you will find it really good. As for the event methods of frame series tags, they are generally not used very much. if you need them, check them again. [Haha, I haven't used it yet]
External frame is a must-have knowledge for web development. For example, the background architecture, partial refresh, and page segmentation are all used by frame, especially...