inicio mail me! sindicaci;ón

Result of Chinese composing CSS is aimed at in webpage design

Introduce first how the simpler application such as blank of set font, color, size, paragraph, introduce again from the back below for instance head the word sinks, first retractive. Tell composing of a few commonly used Web page Chinese finally, for instance of Chinese word cut off, fold inside fixed width word row (Word-wrap and Word-break) etc. Because just write the result of respect of a few application, if need complete CSS attribute introduction, ask referenced CSS brochure.

1, how set writing style, color, size — use Font

Font-style set inclined system, for instance Font-style: Italic;

Degree of finish of Font-weight set character, for instance Font-weight: Bold;

Size of Font-size set character, for instance Font-size: 12px; (or 9pt, manual of CSS of reference of different unit indication issue)

Line-height set row spacing, for instance Line-height: 150%;

Facial expression of Color set character (the attention is not Font-color) , for instance Color: Red;

Font-family set font, for instance Font-family: “Lucida Grande” , verdana, lucida, arial, helvetica, body of the Song Dynasty, sans-serif; (this is general write a law)

Above can write in attribute of a Font (write alone besides Color attribute need) :

Font: Italic Bold 12px/150% “Lucida Grande” , verdana, lucida, arial, helvetica, body of the Song Dynasty, sans-serif;

2, how to control paragraph composing — use Margin, text-align

Chinese paragraph is used

Label, the left and right sides (be equivalent to retractive) , paragraph before paragraph the blank after, can use Margin. For instance:

P{

Margin: 18px 6px 6px 18px; /* is to go up respectively, right, below, left, the clockwise */ that began at 12 o’clock

}

Pair of neat means of the character with Text-align, for instance:

P{

Text-align: Center; /* be placed in the middle is right neat */

}

Still have Left, Right and Justify to neat means (two end are right neat)

PS. Mention Margin, I am used to be all label to define Margin when writing CSS: Because acquiescent Margin value causes page composing problem,0; appears because of from time to time, and oneself cannot find a reason (of special attention is the label such as Ul/ol/p/dt/dd)

3, character of vertical setting of types — use Writing-mode

Writing-mode attribute has two values Lr-tb and Tb-rl, former be acquiesce is left - right, go up - below, latter is to go up - below, right - left.

For instance:

P{

Writing-mode: Tb-rl;

}

Can combine Direction composing.

4, the problem of project symbol — use List-style

There is Disc in symbol of the project in CSS (sincere dot) , Circle (hollow circle) , Square (sincere diamonds) , Decimal (arabic numerals) , Lower-roman (Roman numerals of the ordinary form of a Chinese numeral) , Upper-roman (great Roman numerals) , Lower-alpha (letter of English of the ordinary form of a Chinese numeral) , Upper-alpha. For instance set a list (Ul or Ol) project symbol is diamonds, be like:

Li{

List-style: Square;

}

Additionally List-style still has a few values, can use a few little pictures to regard a project as the symbol for instance, write Url(directly below List-style ” picture address ” ) OK. The attention if of list of a project left outside patch (Margin-left) set for 0 when, list-style-position: Outside (acquiesce is Outside) project symbol won’t show. Regrettablly is afore-mentioned project symbol appear and cannot set size, dot and diamonds are so little from beginning to end. And cannot set is perpendicular just be opposite to what go up neat.

5, head the word sinks — use: FIrst-letter

Bogus object: FIrst-letter cooperates Font-size, Float to be able to make a word sink the effect.

For instance:

P:fIrst-letter{

Padding: 6px;

Font-size: 32pt;

Float: Left;

}

6, first retractive — use Text-indent

Text-indent can make first retractive and certain unit inside container. Chinese phase is for instance general every paragraphs before empty two Chinese characters. Can so write:

P{

Text-indent: 2em; /*em is opposite unit, 2em namely now the double */ of size of a word

}

If Font-size is 12px, so Text-indent: 2em is retractive 24px.

7, about Chinese character phonetic notation — use Ruby label and Ruby-align attribute

E.g. phonetic notation Zhu Yin, can use Ruby-align to set pair of neat pattern. This sees inside CSS manual, specific and OK consult by oneself Ruby-align.

8, fixed width Chinese character is cut off — use Text-overflow

Can be opposite with tiring-room language the field content from the database is done cut off processing, e.g. cut 12 Chinese characters (later with suspension points) . But return those who need HTML label to filter sometimes etc, and will control with CSS do not have this problem. Use the following type to list for instance:

Li{

Overflow:hIdden;

Text-overflow:eLlipsis;

White-space:nOwrap;

}

Can handle a character to be in what go up all right to cut off only nevertheless, mishandle much travel.

9, fixed width Chinese character (word) fold row — use Word-break

Cite a case, want to show a lot of place name inside container of a fixed width for example (suppose with blank space space) , to avoid disconnect among place name (namely a word above and another word broke off to go to next group) . Can use Word-break.

Notable is the blank space inside cannot in order to replace (should have a soft blank space the least) .

   Ask an author to contact this station, seasonable annotations your full name. Contact mailbox: EDu#chinaz.com (# instead @ ) .

Bookmark:Digg Del.icio.us Reddit

Leave a Comment