Webpage Design [navigation of displaying site information and how to use CSS to control image size]

Source: Internet
Author: User

 

Script description:
Step 1:CodeJoining the

 

  <  Script Language  =  Javascript  >  
<〈 ! -- Function Linkdisplay (selection)
{
If (Selection = " 1 " )
{
Document.form.info. Value = " All the image materials required for homepage creation are available here. " ;
Document. Form. Go. Value = " Time1.htm " ;
}
Else If (Selection = " 2 " )
{
Document.form.info. Value = " Download of popular software and registration code, complete software categories! " ;
Document. Form. Go. Value = " Time2.htm " ;
} // The link can be added by yourself, and the description can be changed! Else if (selection = "3 "){
Document.form.info. Value = " Friends who are learning and making the homepage will be able to find useful materials here. " ;
Document. Form. Go. Value = " 3. htm " ;
} Else If (Selection = " 4 " )
{
Document.form.info. Value = " A large number of Stills and photos of Chinese and foreign movie stars and beautiful women, James Bond
De, Arnold, fifth element, Harrison Ford, Chow runfa, Titanic, Batman, face changing, X-archives, and other stills. Su huilun, Faye Wong, jiujing, Zhu Yin, and other beautiful tablecloths! " ;
Document. Form. Go. Value = " 4. htm " ;
}
Else If (Selection = " 5 " )
{
Document.form.info. Value = " Thousands of registration codes are waiting for you! And constantly adding new things " ; Document. Form. Go. Value = " 5. htm " ;
}
Else If (Selection = " 6 " )
{
Document.form.info. Value = " The MIDI music room is of course the most popular place for downloading MIDI music. Chinese and foreign pop songs, American nostalgia, and music and video themes " ;
Document. Form. Go. Value = " 6. htm " ;
}
}
Function Moreinfo ()
{
VaR Page = Document. Form. Go. value; window. Location = Page;
} // --
< / SCRIPT>

 

 
 
 
 

Step 2: Add the following code to the region

  <  Form  Name  = Form  >  
< Input Type = Hidden Name = Go Value >
< Table Border = 0 Width = 300 >
< Tr >
< TD Align = Center Width = 111 > < A Href = Javascript: linkdisplay (1 ); > Webpage Image Library </ A > < BR > </ TD >
< TD Align = Center Width = 123 > < A Href = Javascript: linkdisplay (2 ); > Software Download Repository </ A > < BR > </ TD >
< TD Align = Center Width = 160 > < A Href = Javascript: linkdisplay (3 ); > Homepage creation secret </ A > < BR > </ TD >
</ Tr >
< Tr >
< TD Align = Center Width = 111 > < A Href = Javascript: linkdisplay (4 ); > Beauty stars photo < BR > </ A > </ TD >
< TD Align = Center Width = 123 > < A Href = Javascript: linkdisplay (5 ); > Registration Code concentration camp </ A > < BR > </ TD >
< TD Align = Center Width = 160 > < A Href = Javascript: linkdisplay (6 ); > MIDI music room </ A > < BR > </ TD >
</ Tr >
< Tr >
< TD Colspan = 3 Align = Center Width = 402 >
< Div Align = Center > < P > < Textarea Name = Info Rows = 5 Cols = 34 Wrap = Virtual > Click Connect To View Details </ Textarea >
< BR > < Input Type = Button Name = Button Value = Go and see Onclick = Moreinfo () > </ TD >
</ Tr >
</ Table >
</ Form >

 

 
 

How to Use CSS to control the image size? When the image size is too large, especially in some CMS systems, the webpage may be broken and the webpage may be opened, this method can be adjusted according to CSS. The following is a code example:

 

  IMG, a IMG
{
Border : 0 ;
Margin : 0 ;
Padding : 0 ;
Max-Width : 590px ;
Width : Expression (this. width> 590? "590px": This. width) ;
Max-height : 590px ;
Height : Expression (this. Height> 590? "590px": This. Height) ;
}
 
 
In this way, when the image width exceeds 590, the corresponding percentage is reduced!
Related Article

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.