Maybe you like the 3D films better than common film because those 3D films are more dynamic and attractive. It is the same with the web page. When the web page looks like multi-dimensional, it attracts more people and gives a deeper impression. In this article we will learn how to make the frame colorful. A web page which has colorful frames will look more multi-dimensional. In addition, it also can add the dynamic effect for the web page. Now let us learn the exciting special effect. Of course, it needs the help of the HTML codes. Let us start now.
|
First, open the web page you have made in the past. The original web page is like the following picture.
|
Second, open the code view. Put the following blue codes in to the body sentence.
- <script language=JavaScript1.2>
- if (document.all)
- document.body.style.cssText="border:10 ridge #FF9900"
- </script>
|
Of course, you can change the color to others. And we use a CSS style to define the color and border for the frame. The most important is the document language. “if( document all)” means when all the objects in the web page are loaded, the frame will change into the color we have set.
Third, go back to the design view. And save the document. Press F12 to preview it in the Internet Explorer. Like the following two image. You can choose the right color for your web page. But pay attention that you can’t change color at will. It must be fit for the whole web page and be easily accepted by viewers.
|
OK, now we have already finished the special effect of colorful frame. It is very easy. We just need to use the “document.body.style.cssText” codes and can make the web page full of vitality and livingness. This special effect owes to HTML codes. Practice again until you master the ways.

