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

Detailed explanation of MySQL execution plan

The EXPLAIN statement provides information about ...

Ten Experiences in Presenting Chinese Web Content

<br /> Focusing on the three aspects of text...

Steps for importing tens of millions of data into MySQL using .Net Core

Table of contents Preliminary preparation Impleme...

Example of disabling browser cache configuration in Vue project

When releasing a project, you will often encounte...

MySQL 8.0.23 free installation version configuration detailed tutorial

The first step is to download the free installati...

Let's learn about JavaScript object-oriented

Table of contents JavaScript prototype chain Obje...

Tutorial on Installing Nginx-RTMP Streaming Server on Ubuntu 14

1. RTMP RTMP streaming protocol is a real-time au...

Setting the engine MyISAM/InnoDB when creating a data table in MySQL

When I configured mysql, I set the default storag...

Vue implements student management function

This article example shares the specific code of ...

Sample code for implementing mysql master-slave replication in docker

Table of contents 1. Overview 1. Principle 2. Imp...

How to display TIF format images in browser

The browser displays TIF format images Copy code T...

Linux system disk formatting and manually adding swap partition

Windows: Support NTFS, FAT Linux supports file fo...

How to deploy Solidity smart contracts using ethers.js

If you have developed DApps on Ethereum, you may ...

sql script function to write postgresql database to implement parsing

This article mainly introduces the sql script fun...

Use of Linux watch command

1. Command Introduction The watch command execute...