iframe parameters with instructions and examples

iframe parameters with instructions and examples

<iframe src=”test.jsp” width=”100″ height=”50″ frameborder=”no” border=”0″ marginwidth=”0″ marginheight=”0″ scrolling=”no” allowtransparency=”yes”></iframe>

<iframe runat="server" src="you page's url" width="750" height="30" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="yes"></iframe>
runat="server" This is best added with Iframe jump asp.net can jump in the current iframe
src URL to link to
frameborder Whether to display the border (0 is no border, 1 is border)
scrolling Whether there is a scroll bar (yes, there is a scroll bar, no, there is no scroll bar)
allowtransparency Whether the background is transparent (yes transparent no opaque)
Iframes are not very commonly used and are rarely used in standard web pages. It is appropriate to interpret iframe as a "browser within a browser". <iframe> should also be a form of frame. The difference between it and <frame> is that iframe can be embedded in any part of a web page. For example:
<iframe frameborder=0 width=170 height=100 marginheight=0 marginwidth=0 scrolling=no src="move-ad.htm"></iframe>
SRC=URI embedded cabinet page file path
NAME=CDATA The name of the built-in cabinet
LONGDESC=URI description
WIDTH=Length Width
HEIGHT=Length
ALIGN=[ top | middle | bottom | left | right ] alignment
FRAMEBORDER=[ 1 | 0 ] Frame border
MARGINWIDTH=Pixels Left and right margin width
MARGINHEIGHT=Pixels The height of the upper and lower spaces
SCROLLING=[ yes | no | auto ] Scroll bar (yes: forced display | no: never display | auto: automatic)
The format of the Iframe tag is:
<Iframe src="URL" width="x" height="x" scrolling="[OPTION]" frameborder="x" name="main"></iframe>
src: The path of the file, which can be an HTML file, text, ASP, etc.
Width, height: the width and height of the "internal frame" area;
scrolling: When the HTML file specified by SRC cannot be fully displayed in the specified area, the scrolling option, if set to NO, no scroll bar will appear; if set to Auto: the scroll bar will appear automatically; if set to Yes, it will be displayed;
FrameBorder: The width of the area border. In order to allow the "inner frame" to blend with the adjacent content, it is often set to 0.
name: The name of the framework, used for identification.
<iframe> is used to set a floating frame or container for text or graphics.
border
<iframe border="3"></iframe>
Sets the width of the border around the frame
frameboder
<iframe frameboder="0"></iframe>
Sets whether the border is 3-dimensional (0=no, 1=yes)
height,width
<iframe height="31" width="88"></iframe>
Set the width and height of the border
scrolling
<iframe scrolling="no"></iframe>
Is there a scroll bar (yes, no, auto)
src
<iframe src="girl.gif"></iframe>
Specify the file or image called by the iframe (html,htm,gif,jpeg,jpg,png,txt,*.*)

Note:
A floating frame does not need to be declared as part of a frameset via a <frameset> element;
WebTV and Netscape 4.x (4.0 to 4.75) do not support floating frames.
In the HTML 4.01 strict specification, the <iframe> element is not defined. Floating frames can be mimicked using the <div> element and CSS positioning methods.

Attributes of the floating frame tag Iframe:

1. File location:
Syntax: src=url
Note: url is the location of the embedded HTML file, which can be a relative address or an absolute address.
Example: <iframe src="iframe.html">

2. Object name:
Syntax: name=#
Note: # is the name of the object. This property gives the object a name so that other objects can use it.
Example: <iframe src="iframe.html" name="iframe1">

3. ID selector:
Syntax: id=#
Description: Specifies the unique ID selector for this tag.
Example: <iframe src="iframe.html" id="iframe1">

4. Container properties:
Syntax: height=# width=#
Description: This property specifies the height and width of the floating frame. The value can be a positive integer (in pixels) or a percentage.
Height: specifies the height of the floating frame;
width: Specifies the width of the floating frame.
Example: <iframe src="iframe.html" height=400 width=400>

5. Size adjustment:
Syntax: noresize
Description: IE-specific attribute, specifies that the floating frame cannot be resized.
Example: <iframe src="iframe.html" noresize>

6. Border display:
Syntax: frameborder=0,1
Description: This property specifies whether to display the floating frame border.
0: Do not display the floating frame border;
1: Display floating frame border.
Example: <iframe src="iframe.html" frameborder=0>
<iframe src="iframe.html" frameborder=1>

7. Frame thickness:
Syntax: border=#
Description: This property specifies the thickness of the floating frame border. The value can be a positive integer or 0, and the unit is pixel. In order to seamlessly integrate the floating frame with the page, border is generally equal to 0.
Example: <iframe src="iframe.html" border=1>

8. Border color:
Syntax: bordercolor=color
Description: This property specifies the color of the floating frame border. color can be an RGB color (RRGGBB) or a color name.
Example: <iframe src="iframe.html" bordercolor=red>

9. Alignment:
Syntax: align=left, right, center
Description: This property specifies how the floating frame is aligned with other objects.
left: on the left;
right: on the right;
center: center.
Example: <iframe src="iframe.html" align=left>
<iframe src="iframe.html" align=right>
<iframe src="iframe.html" align=center>

10. Adjacent spacing:
Syntax: framespacing=#
Description: This property specifies the spacing between adjacent floating frames. The value is a positive integer and 0, and the unit is pixel.
Example: <iframe src="iframe.html" framespacing=10>

11. Internal padding properties:
Syntax: hspace=# vspace=#
Description: This property specifies the border size within the floating frame. The value is a positive integer and 0, and the unit is pixel. Both properties should be applied simultaneously.
hspace: the size of the left and right borders within the floating frame;
vspace: The upper and lower border sizes within the floating frame.
Example: <iframe src="iframe.html" hspace=1 vspace=1>

12. External padding properties:
Syntax: marginheight=# marginwidth=#
Description: This property specifies the border size of the floating frame. The value is a positive integer and 0, and the unit is pixel. Both properties should be applied simultaneously.
Marginheight: the left and right border size of the floating frame;
Marginwidth: The upper and lower border sizes of the floating frame.
Example: <iframe src="iframe.html" marginheight=1 marginwidth=1>

<<:  Rules for using mysql joint indexes

>>:  61 Things Every Web Developer Should Know

Recommend

CocosCreator Universal Framework Design Network

Table of contents Preface Using websocket Constru...

How to view and set the mysql time zone

1. Check the database time zone show variables li...

Vue data responsiveness summary

Before talking about data responsiveness, we need...

How to solve the problem of FileZilla_Server:425 Can't open data connection

When installing FileZilla Server on the server, t...

MySQL installation tutorial under Centos7

MySQL installation tutorial, for your reference, ...

Some CSS questions you may be asked during an interview

This article is just to commemorate those CSS que...

How to implement Mysql scheduled task backup data under Linux

Preface Backup is the basis of disaster recovery....

MySQL paging query optimization techniques

In applications with paging queries, queries that...

Interpretation of 17 advertising effectiveness measures

1. 85% of ads go unread <br />Interpretatio...

What you need to know about MySQL auto-increment ID

Introduction: When using MySQL to create a table,...

Limit input type (multiple methods)

1. Only Chinese characters can be input and pasted...

MySQL 8.0.11 Installation Tutorial under Windows

This article records the installation tutorial of...

How to start multiple MySQL instances in CentOS 7.0 (mysql-5.7.21)

Configuration Instructions Linux system: CentOS-7...

Detailed explanation of Linux kernel macro Container_Of

Table of contents 1. How are structures stored in...