Monday, October 26, 2009

Play easily turn pattern table is simple- - pattern expresses sheet

2, the beautification of the exterior that express sheet

A lot of moment, we collect this function to use watch sheet to realize data merely, the watch sheet that often sees is " 1000 people one side " , fine long hair is lacklustre, this special subject is trying to change this one appearance, try to gift the watch is onefold an appearance of rich and colorful.
Express only outward appearance, also be most direct pattern, can achieve specially good effect through changing it, the article divides a jumping-off place to tell about: CSS blackart and image blackart.

1, CSS blackart

CSS, it is the cascade style sheet that everybody knows, it can define the exterior of page element, include color of font style, setting and image style, frame style, Balaam style, attrib border style to wait a moment, below set out from these a few respects, discuss how to apply CSS in expressing sheet, complete beautification it!

The application of 1.1 font style

Font style includes: Division of font a group of things with common features (style of Font-family) , font (Font-style) , font is out of shape (Font-variant) , font is added thick (size of Font-weight) , font (Font-size) , font (Font) , specific definition means, be here to be not told about in detail, can consult its data.
Perhaps you had noticed, the character on pushbutton is pie-eyed, can be solved actually through CSS font style, no less, a few of other tables that involve a character are individual, for example, casing of text casing, much travel text, countersign casing, next pulling choice casing is OK applied font style.
To reveal these application adequately, next exemples are special designed a few kinds of forms, in applying actually, need not so messy, apply neatly:

Sample 12: The font style that expresses unit element is revealed







Analysis:
  • The character in text casing is to add thick, size is 9pt, font is body of the Song Dynasty, code:
    < Input Type="text" Name="formExam" Size="10" Maxlength="10" Style="font-family: Old man? Font-size: 12px; Font-weight: Bold" Value=" adds thick " >
  • Countersign casing character is gules, code:
    < Input Type="password" Name="formExam3" Style="font-size: 9pt; Color: > of #FF0000" Size="8" Maxlength="8"
  • Facial expression of next the character that draw circle are gules, font is Verdana, size is 9pt, code:
    < Select Name="select" Size="1" Style="font-family:VErdana, arial; Font-size: 9pt; Color: #FF0000" >
    < of Yesky.com of > of < Option Value="2" Selected / Option >
    < of Redidea.net of > of < Option Value="1" / Option >
    < / Select >
  • Casing of much travel text font is Verdana, have underline, size is 9pt, code:
    < TEXTAREA Name="formExam2" Cols="30" Rows="3" Style="font-family:VErdana, arial; Font-size: 9pt; Color : #000099; Text-decoration: < of Underline Css Style / TEXTAREA >
  • Send 1 differ with the script that sends 2 pushbutton, because sent 1 pushbutton to use the written language of body of the Song Dynasty of 9pt,be, compare so beautiful, send the code of 1 pushbutton:
    < Input Type="submit" Name="Submit" Value=" sends 1" Style="font-family: Old man? Font-size: 9pt;" >

Brief summary: Wanted us to be familiar with the style of font only, OK and agile changeful, must not use Style to define inside label, can define completely in < Head > , exterior perhaps cite CSS file, when be being used, cite to be able to achieve expectant result.

1.2 setting color resembles modal application with the graph

Have a lot of time, the webpage collocation as a result of color, must mix to the setting color with simple table image style undertakes designing, setting color uses Background-color property, background picture uses Backgroun d-image property, the result that color and image can get expect is less than likewise.

Sample 13: The setting that expresses unit element is revealed

Answer anthology Sheet choosing



Analysis:
  • Text casing setting is black, font is white, code:
    < Input Type="text" Name="RedFld" Size="10" Maxlength="10" Style="color: #FFFFFF; Background-color: #000000" >
  • Countersign casing setting is gray, code:
    < Input Type="password" Name="RedFld3" Size="10" Maxlength="10" Style="background-color: #999999" >
  • Sheet is chosen and answer the setting that chooses pushbutton is red, code:
    < Input Type="checkbox" Name="checkbox" Value="checkbox" Style="background-color: #FF0000" >
    < Input Type="radio" Name="radiobutton" Value="radiobutton" Style="background-color: #FF0000" >
  • The option that choice circle draws below is the setting of rich and colorful, code:
    > of < Select Name="select2" Size="1"
    < Option Selected Style="background-color: < of #FF0000" > Yesky.com / Option >
    < Option Style="background-color: < of #0000CC" > Redidea.com / Option >
    < Option Style="background-color: < of #009900" > Chinabyte.c om / Option >
    < Option Style="background-color: #ff33cc" > Sina.com < / Option >
    < Option Style="background-color: #999999" > Sohu.com < / Option >
    < / Select >
  • The setting of casing of much travel text is an image, code:
    < TEXTAREA Name="RedFld2" Cols="25" Rows="3" Wrap="VIRTUAL" Style="background-image: Url(back.gif)" > < / TEXTAREA >
  • The setting of Submit1 pushbutton is yellow, code:
    < Input Type="submit" Name="Submit3" Value="Submit1" Style="background-color: #FF9900" >
  • The setting of Submit2 pushbutton is an image, code:
    < Input Type="submit" Name="Submit22" Value="Submit2" Style="background-image: Url(back.gif)" >

Brief summary: With good Background-color attribute and Background-image attribute, can design very piece " color " express sheet.


The application of 1.3 frame style

Perhaps you feel the frame that expresses sheet is too formalist, we whether design single line, or Where is the frame style of other? OK of course!

The attribute that concerns with frame has: Frame style Border-style, go up Border-width of width of Border-colr of color of Border-left of Border-bottom of casing of Border-right of casing of frame Border-top, right, below, left casing, frame, frame, above width of casing of casing width Border-top-width, right, do not make here tell about in detail, ask referenced concerned data.

Sample 14: Of 8 kinds of frame forms reveal



Answer anthology Sheet choosing

Analysis:
  • Text casing has type of 8 sort frame, namely Border-style, reveal respectively in this exemple,
    The setting of frame width has a law: Border-width: [Thin | Medium | Thick | < length > ] {1, 4}
    Frame width uses the frame width that install an element to 4 values, they are applied at going up respectively, right, fall and left casing width. If give out only,one is worth, it is applied at all frame width. If two or 3 values gave out, omited value and subtense are equal
    For example: < Input Type="text" Name="RedF" Style="border-color: #006600; Border-style: Dotted; Border-width: 1px" >
    The setting of frame color has a law: Border-colr: {1 of < color > , 4}
    Frame color uses the frame color that install an element to 4 values. If 4 values gave out, they are applied at going up respectively, right, fall and left casing color. If give out only,one is worth, it is applied at all frame color. If two or 3 values gave out, omited value and subtense are equ al.
  • To casing of much travel text and pushbutton, the means that sets frame and text circle are same, state no longer;
  • Because issue the setting that pulls choice casing Select not to support frame, to it so the setting is infructuous;
  • Sheet choosing pushbutton and answer the frame that chooses pushbutton, the effect of the setting is very not harmonious, suggest to be not installed to them so, have otherwise " ruin the effect by adding sth superfluous " feeling;

Sample 15: The special design of frame is revealed

Clever reader can think of certainly, if design odd frame, certain more beautiful, yes! We try the setting effect of frame of the following part below, this precedent is only with Solid and Dotted the frame of two kinds of types is made demonstrate, the frame principle of other type is same:

Code: Style="background-color: #FFFFFF; Border-color: #000099; Border-style: Solid; Border-width: 0px 0px 1px "


Code: Style="background-color: #FFFFFF; Border-color: # CCCCCC Black #FF0000; Border-style: Solid; Border-width: 1px 0px "


Code: Style="background-color: #FFFFFF;border-left: 1px Dotted #ff0000; Border-right: 1px Dotted #ff0000; Border-top: 1px Dotted #ff0000; Border-bottom:1Px Solid #000000 "
Attention: The exterior of frame type is as follows:
  • None: Without frame. With the Border-width that any designation the value has nothing to do;
  • Dotted: Dot line;
  • Dashed: Dotted line;
  • Solid: Solid line frame;
  • Double: Crewel frame. Two single track are mixed with what meantime lies between be equal to appointed Border-width to be worth;
  • Groove: 3D groove;
  • Ridge: Frame is protuberant;
  • Inset: 3D sunken edge;
  • Outset: 3D chimb;

2, image blackart

Image, it is the important element of the webpage, whether apply in expressing sheet? Next, we transform formalist watch sheet with image, divide a part to discuss: Replace pushbutton with image, with setting graph beautification expresses unit element.

2.1 replace pushbutton with image

Because acquiescent table is simple pushbutton is too deformed, the website of great majority used image button, so, we look how to come true through two example:

Sample 16: Replace with image refe r pushbutton:

When only one refers pushbutton, come true OK and simply, need not add incident function, code is:
< Input Type="image" Name=" . . . .. Src="url" Width="" Height=" . . . .. Border=" . . . .. ?

Besides label instead Input Type="image" , the attribute of the attribute of other and label of < Img > is same, for example:

Want to you can replace all pushbutton with the picture only? Yes, nevertheless, either above so simple, must add incident function, otherwise, the picture is to refer pushbutton, cannot fulfil the function such as restoration, saw the example below know:

Sample 17: Replace all pushbutton that express sheet with the picture:
Attention:
  • The picture code form that replaces Submit pushbutton is
    < Input Type="image" Name=" . . . .. Src=" . . . .. OnClick="document.formName.submit()" >
  • The code picture form that replaces Reset pushbutton is
    <a Href="javascript:dOcument.formName.reset();"> < Img Border=0 Src=" . . . .. ?/a>
    Note: The FormName here is the Name property value that expresses sheet.
2.2 with setting graph beautification expresses unit element

Actually, had mentioned in front, with Background-image:uRl() attribute comes the background picture of define table single element, here lifts only, can see, do not have the effect besides Select beyond, the can cooperate a webpage setting of other will install them.

Sample 18: The setting of background picture


 

No comments:

Post a Comment