网 易 "mailbox clone" pop-up window effect

xiaoxiao2021-04-06  339

I have been using the found 163 mailbox quite perfect, especially the window effect pops up in the mailbox clone, it is simulated software, cool! I don't know how code is written, I haven't worked and studied. Today, I saw someone in the JavaScript Forum, I have collected it.

<

HTML

>

<

HEAD

>

<

Meta

HTTP-Equiv

= "Content-Type"

Content

= "text / html; charSet = GB2312"

>

<

Title

>

Pop-up effect

Title

>

HEAD

>

<

Script

>

VAR

Falpha =

0

;

FUNCTION

Fchange () {

IF

(Falpha)

! =

90

) {Table1.Style.Filter

=

"

Alpha (Opacity =

"

Falpha

"

)

"

Falpha

=

Falpha

10

Settimeout

"

Fchange ()

"

,

200

}

Else

{Falpha

=

0

}}

FUNCTION

SSS () {Table1.Style.height

=

(Window.Document.body.clientheight.body.clientHeight

>

Window.Document.body.scrollHeight)

?

Window.Document.body.clientHeight: window.document.body.scrollHeight; Table1.Style.width

=

"

100%

"

Table1.Style.display

=

'block' table2.style.Left

=

Window.Document.body.scrollwidth

/

2

-

100

Table2.Style.top

=

Window.Document.body.offsetheight

/

2

-

100

Table2.style.display

=

'block' fchange ()}

FUNCTION

FRESET () {Table1.Style.Display

=

'none'table2.style.display

=

'none'}

Script

>

<

Body

Topmargin

= 0

LEFTMARGIN

= 0

Bgcolor

= YELLOW

Style

= "Display: block;"

>

<

TABLE

id

= "Table1"

Style

= "Background = '# fffff'; Display: None; Position: absolute; z-index = 1; filter: alpha (opacity = 90)"

OnContextMenu

= "Return False"

>

<

TR

Width

= 100% Height

= 100%

>

<

TD

>

TABLE

>

<

TABLE

OnContextMenu

= "Return False"

id

= "Table2"

Border

= "2"

Style

= "Background = '# e1e100'; bordercolor = red; Display: none; position: absolute; z-index = 2; width: 200; Height: 100;"

Cellspacing

= "0"

Cellpadding

= "0"

Bordercolor

= "# 800000"

>

<

TR

Width

= 150

HEIGHT

= 20

>

<

TD

Align

= "Right"

Bordercolor

= "# E1e100"

>

<

INPUT

Type

= "Button"

Onclick

= "FRESET ()"

Value

= 'Determinism

>

TD

> <

TD

Bordercolor

= "# E1e100"

> <

INPUT

Type

= "Button"

Onclick

= "FRESET ()"

Value

= 'Cancel'

>

TD

>

TR

>

TABLE

>

<

Br

> <

Br

> <

Br

> <

Br

> <

Br

> <

Br

> <

Br

> <

Br

> <

Br

> <

Br

> <

Br

> <

Br

> <

Br

> <

Br

> <

Br

> <

Br

> <

Br

> <

Br

> <

Br

> <

Br

>

<

p

> <

Br

> <

Br

> <

Br

> <

Br

>

<

INPUT

Type

= "Button"

Onclick

= "SSS ()"

Value

= 'Application Submit'

>

p

>

Body

>

HTML

>

Its basic idea is: set a table A1, and z-index is 1, and is an absolute positioning. Start setting its Display to None, then set a hidden analog pop-ups A2, Z-index to 2, display the property to none, add a button to the page, then set the Display of A1 to Block, The aspect is set to 100%, and the transparency is adjusted; because Display = block, z-index = 1 This allows it to cover the content of the original page makes it impossible. Click on the button in the analog window to activate the restoration properties, set the A1 and A2 display to NONE.

转载请注明原文地址:https://www.9cbs.com/read-132359.html

New Post(0)