In this example, Jquery is used to turn off the light on the video playback page. The embed element is used for video display. This element is an html5 element, so it works better to use a browser that supports html5.
Effect preview URL: http://www.keleyi.com/keleyi/phtml/guandeng/
Complete code:
Copy codeThe Code is as follows:
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Title> Zhang guorong "Qiqian song" -- Special lighting effect for House of feet </title>
<Style type = "text/css">
Body {font-family: Arial, Sans-Serif; font-size: 13px; text-align: center; margin: 0px; position: relative ;}
# Container {width: 960px; margin: 0px auto; text-align: left; overflow: hidden; position: relative ;}
# Movie_keleyi_com {border: solid 1px # dcdcdc; float: left; width: 560px; text-align: left; margin-right: 20px; position: relative; z-index: 102 ;}
# Description {float: left; width: 320px; border: solid 1px # dcdcdc; padding: 10px 20px ;}
# Command {position: relative; height: 25px; display: block; margin: 25px 0 0 0 ;}
. LightSwitcher {position: absolute; z-index: 101; background-image: url (http://www.keleyi.com/keleyi/phtml/guandeng/light_bulb_off.png );
Background-repeat: no-repeat; background-position: left; padding: 0 0 0 20px; outline: none; text-decoration: none ;}
. LightSwitcher: hover {text-decoration: underline ;}
# Shadow {background-image: url (http://www.keleyi.com/keleyi/phtml/guandeng/shade1x1.png); position: absolute; left: 0; top: 0; width: 100%; z-index: 100 ;}
. TurnedOff {color: # ffff00; background-image: url (http://www.keleyi.com/keleyi/phtml/guandeng/light_bulb.png );}
# ClickHere {position: absolute; top:-25px; left: 130px ;}
</Style>
<Script src = "http://www.keleyi.com/keleyi/pmedia/jquery-1.8.2.min.js" type = "text/javascript"> </script>
<Script type = "text/javascript">
$ (Document). ready (function (){
$ ("# Shadow" ).css ("height", $ (document). height (). hide ();
$ (". LightSwitcher"). click (function (){
$ ("# Shadow"). toggle ();
If ($ ("# shadow"). is (": hidden "))
(This).html ("turn off the light"). removeClass ("turnedOff ");
Else
((This).html ("turn on the light"). addClass ("turnedOff ");
});
});
</Script>
</Head>
<Body>
<Div id = "container">
<Div id = "header">
<H1> Zhang guorong, Qiqian song <H2> special lighting effect <Div id = "command"> <a class = "lightSwitcher" href = "javascript: void (); "> turn off the light </a> </div>
</Div>
<Div id = "movie_keleyi_com">
<Embed src = "http://player.youku.com/player.php/sid/XMjE1ODgyMTU2/v.swf" quality = "high" width = "560" height = "340" align = "middle" allowScriptAccess = "always" allowFullScreen = "true" mode =" transparent "type =" application/x-shockwave-flash "> </embed>
</Div>
<Div id = "description">
<P> </p>
<P> </p>
<P> </p>
<P> <br/>
<A href = "http://www.keleyi.com/a/bjac/7e8897e5ec0849e9.htm" target = "_ blank"> can change the size of the DIV layer </a> <br/>
<A href = "http://www.keleyi.com/a/bjac/141932b419e08101.htm" target = "_ blank"> jquery uses ColorBox to pop up the picture group browsing layer </a> <br/>
<A href = "http://www.keleyi.com/dev/433ee98f4133d7b5.htm" target = "_ blank"> jQuery implements a drag-and-drop floating layer (version 2) </a> <br/>
<A href = "http://www.keleyi.com/dev/7fd16e1b9849dba4.htm" target = "_ blank"> jquery "add this page" Code </a> <br/>
<A href = "http://www.keleyi.com/a/bjac/1329fae4a4a54bdd.htm" target = "_ blank"> ke leyi advanced pop-up menu (three levels of menus are available) </a> <br/>
<A href = "http://www.keleyi.com/a/bjac/939631bb07adb4dc.htm" target = "_ blank"> light off Effect Original article </a>
</P>
</Div>
</Div>
<Div id = "shadow"> </div>
</Body>
</Html>