What is the use of introducing HTML frames (Frames)?

零下一度
Release: 2017-05-02 15:16:28
Original
2801 people have browsed it

Using Frame, you can display multiple web pages in the browser window at the same time. A web page is set in each Frame, and the web pages in each Frame are independent of each other.

Frameset

Determines how to divide the Frame.has cols attributes and rows attributes. Use the cols attribute to distribute the Frame by columns; use the rows attribute to distribute the Frame by rows.

Frame

Use thetag to set the web page. There is a src attribute in, and the src value is the path and file name of the web page.

The purpose of the following code is to divide the Frameset into 2 columns. The first column is 25%, which means the width of the first column is 25% of the window width; the second column is 75%, which means the width of the first column. is 75% of the window width. a.html is displayed in the first column and b.html is displayed in the second column.

   
Copy after login

Iframe

Iframe means Inline Frame. Useto place the Frame within an HTML file.

Example

      
Copy after login

This example shows how to display three web pages at the same time in the browser. The three web pages are distributed in columns.

      
Copy after login

This example shows how to display three web pages at the same time in the browser. The three web pages are distributed in rows.

Mixed Frameset

        
Copy after login

This example uses both the cols attribute and the rows attribute to flexibly distribute the Frame.

The noresize attribute in Frameset

        
Copy after login

Use the Noresize attribute to ensure the size of the Frame. If the noresize attribute is not used, you can use the mouse to move the border of the Frame to change the size of the Frame. If the noresize attribute is set, the border cannot be moved.

Frame for navigation

     
Copy after login

This example demonstrates how to create a Frame for navigation. This navigation Frame contains an HTML, and this HTML (code below) contains a list of web pages. Click on any item in the web page list, and the clicked web page will be displayed in the second Frame.

Usage of Iframe

  

用 IFRAME 可以在HTML文件里显示另一个网页。

这个 HTML 文档中使用 IFRAME 来显示另外一个叫Frame_a.html 的网页。

Copy after login

This example shows how to use iframe to embed a web page in an HTML file.

The above is the detailed content of What is the use of introducing HTML frames (Frames)?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!