Tips for making Web pages

Source: Internet
Author: User
Web page 1. Add Video animation to homepage
Just add the following code to your Web page to add a Windows video animation or other Rralmedia format video animation to your homepage.

In this code, the value of DYNSRC is the name of your animated file, which should be a file with AVI, RA, and Ram as the suffix name, and 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 screen when the animation is played (expressed in pixels or percentages); The alt value is a hspace description of the animated file; the distance (in pixels) of the screen from the left side of the page; vspace is the distance from the top of the page ( In pixels, where you can change the Test.avi file to their own video files.

2, let the hyperlink automatically change color
As you know, if you want to make a Web page dynamic, you typically insert an animated image into a Web page or design a dynamic effect in Java, but because the animation takes up too many bytes, the design of the dynamic effect with Java requires a certain design basis. The following author provides a way to make the hyperlinks on the page have been constantly changing color, so that their own web page looks also dynamic. To do this, we can simply paste the following source code between <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");d Elay =. 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, at any time to change the Web page online background image
We usually see the Web page background image is generally static, ordinary visitors do not have the right to change the background pattern of the page, I do not know if you have to make a Web page can allow visitors to change the background image? If you have this idea, the following code will help us to implement this function easily, all we have to do is copy the source code provided below and paste it into the appropriate location of the HTML codes in our Web page. Dare not say very useful, but the use of good words is absolutely icing on the cake. Okay, let's take a look at the code first.
<form>
<select >
<option value= "url (' address of background one ')" selected> first background
<option value= "url (' background two address ')" > second background
<option value= "url (' address of background three ')" > three background
....... Other selection formats are as above ...
</selected>
</form>
When we use this code, we can choose the background that we need first, and then replace the URL of the background image with the background address of the above code, so we can easily implement the random change of background images.

4, so that the image and browse the window to achieve seamless joint
When we insert an image into a Web page, we sometimes find it difficult to seamlessly interface between the image and the frame of the browser window, and there is always a bit of distance, and it seems unnatural. So what can we do to achieve seamless interface between images and browsing windows, so that the image is naturally integrated into the window background? In fact, the inserted image and the browser's border has a gap, this is because we do not set the page margins, to solve the seamless joint approach is the source code of the page in the <body> tag to add the following sources: topmargin= "0" leftmargin= "0" Where topmargin represents the distance from the top of the browser window and is set to 0, the image is seamlessly jointed with the browser window. Leftmargin= "0" indicates the distance to the left of the browser window is 0.

5, use the outline way to display the image
If we do need to place a larger image in the Web page, we might want to use the thumbnail display method, given the relatively slow speed of the image transfer, so that the visitor can get a quick idea of what the image represents. That is, before displaying the original, provide a lower resolution, smaller size image as "low source", so that the browser can quickly display, and then gradually to high-quality or large size of the original artwork to replace. If the user sees that the thumbnail display is not what they want, you can go directly to the other content without waiting, thus increasing the efficiency of browsing. The way to achieve a thumbnail display is to add the following code to the HTML source file for the page:

Where Http://edu.cnzz.cn/NewsInfo/view.gif is the original image, Prehttp://edu.cnzz.cn/newsinfo/view.gif is a thumbnail, width is the original size of the original, height is the original.

6, the establishment of a site search engine
As the content of the page grows, it becomes more and more difficult to get a certain content within the site quickly and accurately. In order to enable visitors to quickly find the information they want, you need to build a search engine within the station. To build a site of the search engine, we can directly link to the Web site network of the SAR Http://netzone. Swatou. com/personal/, click "Apply for Site engine" and fill in the application form, then set up the site page database as required.

7, let the background music continue to play
We know that when you open a page that contains background music, we can hear a melodious music, but when we click on a link in the page or go to another page, the playing background will suddenly stop, then there is no way to let a certain page of the background music continue to play it? The answer is yes, in fact, we just need to create a frame structure of the page, the sound file included in the next Frame page content, and the next frame width set to 0 pixels, and the above frame is the normal page content, because the next frame does not occupy the window space, This is equivalent to the page containing the sound file when we leave the page containing the background music, because the next Frame page content unchanged, so the sound can continue to play.

For editing reasons, all the code's angle brackets are full-width characters, and when applied, change to Half-width.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.