iframe tag creates an inline frame that contains another document

There is a need to add something at the bottom of a certain page, but there is no component content of this page, only a link to access the page, so we have to use the iframe tag to display the page based on the a tag, and on that page Add something.

The iframe element creates an inline frame (an inline frame) that contains another document.

Attributes value describe
align
  • left
  • right
  • top
  • middle
  • bottom

Deprecated. Please use styles instead.

Specifies how this frame is aligned relative to surrounding elements.

frameborder
  • 1
  • 0
Specifies whether to display a border around the frame.
height
  • pixels
  • %
Specifies the height of the iframe.
longdesc URL Specifies a page that contains a longer description about the iframe.
marginheight pixels Defines the top and bottom margins of the iframe.
marginwidth pixels Defines the left and right margins of the iframe.
name frame_name Specifies the name of the iframe.
referrerpolicy
  • no-referrer
  • no-referrer-when-downgrade
  • origin
  • origin-when-cross-origin
  • same-origin
  • strict-origin-when-cross-origin
  • unsafe-url
Specifies the name of the iframe.
sandbox
  • ""
  • allow-forms
  • allow-same-origin
  • allow-scripts
  • allow-top-navigation
Enables a set of additional restrictions on content within <iframe>.
scrolling
  • yes
  • no
  • auto
Specifies whether to display scroll bars in iframe.
seamless seamless Specifies that the <iframe> appears to be part of the containing document.
src URL Specifies the URL of the document displayed in the iframe.
srcdoc HTML_code Specifies the HTML content of the page displayed within the <iframe>.
width
  • pixels
  • %
Defines the width of the iframe.

 Give a chestnut (including a picture):

<body>
    <iframe src="/i/eg_landscape.jpg"></iframe>
    <p>一些老的浏览器不支持 iframe。</p>
    <p>如果得不到支持,iframe 是不可见的。</p>
</body>

Effect:

 Contains a page: src is followed by the access link to that page. After the iframe tag, you can write the content to be added.

<iframe
   src="https://xxx"
   width="100%"
   height="100%"
   frameborder="no"
   scrolling="no"
></iframe>

Guess you like

Origin blog.csdn.net/qq_46372045/article/details/126937416