1. Add video animation to the homepage
Just add the following code to your webpage, you can add Windows video animation or other RralMedia format video animation to the homepage.
In this code, the value of dynsrc is the name of your animation file, which should be a file with the suffix avi, ra, or ram; the value of start is generally "fileopen", so that the animation can be played automatically ; The values of width and height are respectively the width and height of the picture when the animation is played (in pixels or expressed as a percentage); the value of alt is the non-display description of the animation file; hspace is the distance of the picture from the left side of the page ( (in pixels); vspace is the distance between the picture and the top of the page (in pixels). Here you can change the test.avi file into the video file you need.
2. Let the hyperlink change color automatically
As we all know, if you want to make a web page have dynamic effects, you generally need to insert animated images into the web page or use java to design a dynamic effect; but because animation takes up too many bytes, Using Java to design dynamic effects requires a certain design foundation. The author below will provide a method to make the hyperlinks on the page change color continuously, so that your web page looks dynamic. To achieve this effect, we only need to paste the following source code between the
<script Language="Javascript"> <! - - Begin function initArray( ) { for ( var i = 0 ; i < initArray.arguments.length; i + + ) {this[i] = initArray.arguments[i];} this.length = initArray.arguments.length; } var colors = new initArray ("red","blue","green","black","purple","blue","tan","red");delay = .5; // seconds link = 0 ; vlink = 0 ; function linkDance ( ) { link= (link + 1)%colors.length; vlink=(vlink+1)%colors.length; document.linkColor = colors[link]; document.vlinkColor = colors[vlink]; setTimeout("linkDance( )",delay*1000);} linkDance( ); // End - -> </script>
3. Change the online background image of the webpage at any time
The background images of webpages we usually see are generally static. Ordinary visitors do not have the right to change the background pattern of the webpage by themselves. I wonder if you have ever thought of making one. Can a web page allow visitors to change the background image themselves? If you have this idea, the following code can help us easily implement such a function. All we have to do is copy the source code provided below and paste it into the appropriate position of the HTML code in our own web page. I dare not say that it is very useful, but if used well, it will definitely be the icing on the cake. Okay, let’s take a look at the code first.
<form>
<select onChange="document.body.style.background=this.options[this.selectedIndex].value">
<option value="url('Address of background one')" selected>First One background
<option value="url('The address of background two')"> The second background
<option value="url('The address of background three')"> The third background
.... ..Other selection formats are as above...
</selected>
</form>
When using this code, we can first select or create the required background ourselves, and then replace the URL of each background image The background address in the above code allows us to easily change the background image randomly.
4. Seamless connection between the image and the browser window
When we insert an image into the web page, we sometimes find that it is difficult to achieve a seamless connection between the image and the browser window border, which is always a little bit The distance seems unnatural. So how can we achieve a seamless connection between the image and the browsing window, so that the image can naturally blend into the window background? In fact, the reason why the inserted image has a gap with the browser border is because we have not set the page margin. The way to solve the seamless connection is to add the following source code to the
The above is the content of the tips in web page production. For more related articles, please pay attention to the PHP Chinese website (www.php.cn)!