Home  >  Article  >  Web Front-end  >  How to use iframe to embed other web pages within the current web page

How to use iframe to embed other web pages within the current web page

php中世界最好的语言
php中世界最好的语言Original
2018-02-05 09:25:495604browse

This time I will show you how to use iframe to embed other web pages in the current web page, and what are the precautions for using iframe to embed other web pages in the current web page. The following is a practical case, let’s take a look. .

iframe usage:


<DIV align=center><IFRAME src="<a href="http://www.jb51.net">http://www.PHP.cn</a>" frameBorder=0 marginwidth=0 marginheight=0 scrolling=no style="width168:px;height:50px;" width=168  height=50 scrolling=no ALLOWTRANSPARENCY="true"></IFRAME></DIV>

Description: This is an application example that embeds

weather forecast. This effect is most commonly used. Among them:

1、"http://www.php.cn" 为嵌入的网页的地址;
2、width="168px"  height="50px"为嵌入的网页的宽度和高度,数值越大,范围越大;要隐藏显示嵌入的内容,可把这两个数值设置为 0 ;
3、scrolling="no" 为嵌入的网页的滚动设置,当内容范围大时,可设置为允许滚动为 scrolling="yes"。 ALLOWTRANSPARENCY="true" 为允许透明设置,把true改为no为不透明。下同;
4、frameBorder=0 为嵌入的网页的边框设置,0 表示无边框,1 表示边框粗细,数值越大边框越粗。下同;
5、marginwidth=0 marginheight=0 设置嵌入网页到边距的距离,0 表示无边距。

I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to the php Chinese website

other related articles!

Related reading:

How to set input to read-only effect through disabled and readonly

The spacing problem between label and input in Google Browse How to solve


The above is the detailed content of How to use iframe to embed other web pages within the current web page. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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