Home  >  Article  >  Web Front-end  >  Various parameters of iframe

Various parameters of iframe

php中世界最好的语言
php中世界最好的语言Original
2018-02-11 11:10:105459browse

This time I will bring you the parameters of iframe and what are the precautions for the parameters of iframe. The following is a practical case. Let’s take a look.

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&#39;s url" width="750" height="30" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="yes"></iframe>

runat="server" This is best to add Iframe jump asp.net can jump in the current iframe
src link to the address URl
frameborder whether to display the border (0 no border 1 with borders)
scrolling Whether there are scroll bars (yes with scroll bars, no no scroll bars)
allowtransparency Whether the background is transparent (yes transparent, no opaque)
iframe is not very commonly used in standard web pages Very rarely used. It is appropriate to interpret iframe as a "browser within a browser". d5ba1642137c3f32f4f4493ae923989c should also be a form of frame. The difference from 04a0d55efbbfd646a993fbc01f262c57 is that iframe can be embedded in any part of the web page. For example:

<iframe frameborder=0 width=170 height=100 marginheight=0 marginwidth=0 scrolling=no src="move-ad.htm"></iframe>

SRC=URI The page file path of the embedded cabinet rack
NAME=CDATA The name of the embedded cabinet rack
LONGDESC=URI Description
WIDTH=Length width
HEIGHT=Length height
ALIGN=[ top | middle | bottom | left | right ] Alignment method
FRAMEBORDER=[ 1 | 0 ] cabinet frame border
MARGINWIDTH=Pixels left and right width
MARGINHEIGHT=The height of the upper and lower vacancies of Pixels
SCROLLING=[ yes | no | auto ] flow bar (yes forced display|no never display|auto automatic)
The format of the Iframe tag is:
c01ebdb5e5703c2d0a8b863d214122f6065276f04003e4622c4fe6b64f465b88
src: The path of the file, both But HTML files can also be text, ASP, etc.;
width, height: the width and height of the "internal frame" area;
scrolling: when the HTML file specified by SRC is not displayed in the specified area. , scrolling option, if set to NO, the scroll bar will not appear; if it is Auto: the scroll bar will appear automatically; if it is Yes, it will be displayed;
FrameBorder: The width of the area border, in order to make the "inner frame" and adjacent The contents are blended together and are often set to 0.
name: The name of the framework, used for identification.
d5ba1642137c3f32f4f4493ae923989cA floating frame or container used to set text or graphics.
border

<iframe border="3"></iframe>

Set the edge width around the frameboder

<iframe frameboder="0"></iframe>

Set 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>

Whether there is a scroll bar (yes, no, auto)

src

<iframe src="girl.gif"></iframe>

Specify the file or image called by iframe (html, htm, gif, jpeg, jpg, png, txt,*.*)


Notes:

A floating frame does not need to be declared as part of the frameset via the f900b4fc197b16ab214eecf015bb6bd2 element;
WebTV and Netscape 4.x (4.0 to 4.75) do not support floating frames.
In the HTML4.01 strict specification, the d5ba1642137c3f32f4f4493ae923989c element is not defined. Floating frames can be imitated using the dc6dce4a544fdca2df29d5ac0ea9906b element and CSS positioning methods.

Attributes of floating frame mark Iframe:

1. File location:

Syntax: src=url
Description: url is the location of the embedded HTML file, which can be a relative address , or it can be an absolute address.
Example:

<iframe   src="iframe.html">

2. Object name:

Syntax: name=
#Explanation: # is the name of the object. This attribute 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: Specify the unique ID selector of the tag.
Example:

<iframe   src="iframe.html"   id="iframe1">

4. Container attributes:

Syntax: height=# width=
#Description: This attribute specifies the height and width of the floating frame. The value is a positive integer (unit is pixel) or percentage.
height: Specify the height of the floating frame;
width: Specify the width of the floating frame.
Example:

<iframe   src="iframe.html"   height=400   width=400>

5. Size adjustment:

Syntax: noresize
Description: IE proprietary attribute, the specified floating frame cannot be resized.
Example:

<iframe   src="iframe.html"   noresize>

6. Border display:

Syntax: frameborder=0, 1
Description: This attribute specifies whether to display floating frame borders.
0: Do not display floating frame borders;
1: Display floating frame borders.
Example:

<iframe   src="iframe.html"   frameborder=0>   
<iframe   src="iframe.html"   frameborder=1>

7. Border thickness:

Syntax: border=
#Description: This attribute specifies the thickness of the floating frame border, the value is a positive integer and 0, the unit is pixels . In order to seamlessly combine 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 attribute 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>

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

Related reading:

htmlHow to implement mouse hover prompt A tag content

What are the operations of borderless and borderless iframes

How to use the trigger method to pop up the file selection dialog box without clicking the file type input

The above is the detailed content of Various parameters of iframe. 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