Embed multimedia content into webpages, and embed multimedia into webpages
Chapter 4 embed multimedia content into webpages
Currently, when creating a webpage, you can not only place text and images on the webpage, but also embed audio, video, animation, and other multimedia content on the page, make the page look more colorful and dynamic.
10.1 set scroll Subtitles <marquee>Attribute attribute value description -----------------------------------------------------------
Demo: <marquee direction = "up"> text Scrolling up and down </marquee>Up (from bottom up) down (from top down)
DirectionLeft (from right to left, default scroll direction) sets the scroll direction (scroll direction) right (from left to right )-----------------------------------------------------------
Demo: <marquee behavior = "alternate"> set a text loop to rotate and scroll back and forth </marquee>
BehaviorScroll sets the text to scroll round and round (default behavior) (scroll behavior) slide sets the text to scroll only once alternate sets the text to rotate round-trip to scroll --------------------------------------------------- demo: <marquee scorllamount = "rolling speed value" scrolldelay = "Delay Time"> rolling text </marquee>
ScorllamountSet the text scroll speed. The value is a number. The larger the scroll speed, the higher the scroll speed. The default speed value is 6.
ScrolldelaySet the text to scroll again after a delay of a period of time. The unit of value is millisecond. The smaller the value, the faster it is. The default value is 100 ms -----------------------------------------------------------
Set the subtitle scrolling area, background color, and spacing between subtitles and surrounding objects.Width: Set the width of the text scroll area, which can be a number pixel or percentage value % height. Set the width of the text scroll area, it can be a number pixel or percentage value % bgcolor. Set the background color of the text scroll area. the horizontal distance between the two sides is vspace vertical distance -----------------------------------------------------------
10.2 Set background music <bgsound><Bgsound src = "path/file name" loop = "loop times"> <-- loop: by default, background music is played once. If the value is-1, it indicates that the background music is continuously played. -->
10.3 embed audio and video files <embed><Embed src = "path/file name"> </embed> attribute description: src file path width defines the width of an embedded object in pixels. height defines the width of an embedded object in pixels. loop sets whether embedded objects are played continuously, if the value is true, the loop continues. Otherwise, the video is played only once. The default value is falsehidden, which sets the visibility of the multimedia playback software. The default value is false.
10.4 embed a Flash Animation <object>About the reference of flash in html -- object embed: link 1 link 2HTML insert Flash full compatibility perfect solution: Click Here link demo:
<Object classid = "clsid: d27cdb6e-ae6d-11cf-96b8-444553540000 "codebase =" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0 "width =" 500 "height =" 300 "id =" urgency outbreak "> <param name =" movie "value =" durable burst .swf "> <param name = "FlashVars" value = "prizeResult = 3"> <param name = "quality" value = "high"> <param name = "menu" value = "false"> <param name = "wmode" value = "transparent"> <param name = "allowScriptAccess" value = "always"/> <embed src = "images/tolerance burst .swf" FlashVars = "prizeResult = "3 "allowScriptAccess =" always "wmode =" transparent "menu =" false "quality =" high "width =" 500 "height =" 300 "type =" application/x-shockwave -flash "pluginspage =" http://get.adobe.com/cn/flashplayer/ "name =" burst in patience "/> </object>
The OBJECT
ClassidAnd
CodebaseThe value must be written in this way, telling the browser to automatically download the flash player address. The OBJECT tag is used by the IE browser on the windows platform, EMBED is used for the Netscape Navigator browser on windows and Macintosh platforms and the IE browser on the Macintosh platform. It is called a non-IE browser. On windows, IE uses Activex controls to play flash, while other browsers use the Netscape plug-in technology to play flash. The Code effect is shown as follows: because you do not know how to upload a swf video in the blog garden, the Code effect is displayed as follows:
10.5 embed a Java Applet (Extension)Applet is a small program developed in Java and cannot run independently. It must be embedded in HTML files and run in a Java-supported browser. Basic Syntax: <applet code = "XXX. class "width =" area width "height =" area height "> </applet> syntax description: XXX. class indicates the embedded applet class file. The width and height attributes are used to set the display area of the applet file, in pixels.