日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 前端技术 > HTML >内容正文

HTML

html-iframe_HTML iframe

發布時間:2025/3/11 HTML 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 html-iframe_HTML iframe 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

html-iframe

iframe (Iframes)

In HTML, iframes are used to display a webpage inside another webpage.

在HTML中, iframe用于在另一個網頁內顯示一個網頁。

Syntax:

句法:

<iframe src="URL"></iframe>

The <iframe> tag is used to define an iframe. And the src attribute is used to specify the location (URL) of the webpage that is to be included.

<iframe>標記用于定義iframe。 src屬性用于指定要包含的網頁的位置(URL)。

iframe廣告代碼屬性 (Iframe Tag properties)

Some of the common properties of the iframe are,

iframe的一些常見屬性是

i) height and width properties

i)高度和寬度屬性

The size of the iframe is defined in HTML using height and width properties.

iframe的大小是使用HTML的height和width屬性定義的。

Method 1: In HTML using height and width attribute, the default unit to define the values in pixels.

方法1:在使用height和width屬性HTML中,默認單位以像素為單位定義值。

<!DOCTYPE html><html><head> </head><body><h1>Iframes in HTML </h1><p>Example to define height and width in iframe</p><iframe src="https://www.includehelp.com/" width="500" heigth="200"></iframe> </body></html>

Output

輸出量

Method 2: In CSS using height and width of iframe.

方法2:在CSS中使用iframe的高度和寬度。

<!DOCTYPE html><html><head> </head><body><h1>Iframes in HTML </h1><p>Example to define height and width in iframe</p><iframe src="https://www.includehelp.com/" style="height:400px; width:500px"></iframe> </body></html>

Output

輸出量

ii) Iframe borders (The border property)

ii)iframe邊框(border屬性)

In iFrames, there is a default border around it. You can define the border for the iframe in HTML using CSS border property.

在iFrame中,它周圍有一個默認邊框。 您可以使用CSS border屬性為HTML中的iframe定義邊框。

<!DOCTYPE html><html><head> </head><body><h1>Iframes in HTML </h1><p>Example to define height and width in iframe</p><iframe src="https://www.includehelp.com/" style="border: 2px dotted green"></iframe> </body></html>

Output

輸出量

<!DOCTYPE html><html><head> </head><body><h1>Iframes in HTML </h1><p>Example to define height and width in iframe</p><iframe src="https://www.includehelp.com/" style="border: none;"></iframe> </body></html>

Output

輸出量

iii) Changing link in iframe

iii)在iframe中更改鏈接

In the iframe, the link can be changed for the iframe to the next link in an event. The attribute target and name are required.

在iframe中,可以將iframe的鏈接更改為事件中的下一個鏈接。 屬性目標和名稱是必需的。

The name attribute defines the name iframe whose link is to be redefined.

name屬性定義要重新定義其鏈接的名稱iframe。

The target attribute is defined in another tag with the same value as the name of the iframe and will be used to replace the src of the iframe.

target屬性是在另一個標簽中定義的,該標簽的值與iframe的名稱相同,并將用于替換iframe的src 。

<html><head> </head><body><h1>Iframes in HTML </h1><p>Example to replace link in iframe</p><iframe src="https://www.includehelp.com/" name="iframe1" width="500" height="450"></iframe><br><a href="https://www.includehelp.com/scala/" target="iframe1">Lets see my new article</a> </body></html>

Output

輸出量



After cliking on the link...

點擊鏈接后...



翻譯自: https://www.includehelp.com/html/iframes.aspx

html-iframe

總結

以上是生活随笔為你收集整理的html-iframe_HTML iframe的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。