standards recommend the following font definition methods: Body {font-family: "Lucida Grande", Verdana, Lucida, Arial, Helvetica, XXFarEastFont-Franklin, Sans-serif;
Fonts are selected in the order listed. If the user's computer contains Lucida Grande fonts, the document is specified as
Https://github.com/kenwheeler/brogrammer-theme, fashionFor a selection of programming fonts, refer to: The most appropriate font for writing code
Source Code Pro
Free programming fonts from Https://github.com/adobe/source-code-proAdobe, Siyuan blackbody
Dejavu Sans Mono
Http://dejavu-fonts.org/wiki/Main_Page claims to be the first programming font bitstream Vera Sans Mono's
. find
The code is as follows
Copy Code
#font. Family:sans-serifRemove comments2. Find#font. Sans-serif:bitstream Vera Sans, lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, Sans-serifAmended toFont.sans-serif:microsoft Yahei, bitstream Vera
clearer, and if shadow blur is not required, the blur value can be set to 0;color. It can use the RGBA color.Browser compatibility:Let's see an example.First, give all of the demo a common style and class name:. demo { background: #666666; width:440px; padding:30px; Font:bold 55px/100% "Microsoft Jas Black", "Lucida Grande", "Lucida Sans", He
after they are float.
Correct use of overflow: hidden; General Manager, overflow: hidden mainly refers to overflow and hiding, but it also has a clear floating effect.
Add
Clearfix is used to clear floating (recommended). It is equivalent to creating a target element of a block with blank invisible content to clear floating
. Clearfix {* zoom: 1;}/* For IE7 hack, trigger haslayout of IE7 to clear floating */. Clearfix: before,. clearfix: after {display: table; content: ""; line-height: 0 ;
"Evergreen State" of the state of Washington. "Ana" comes from the name of Virginia Huile's big daughter.
Lucida Grande
Lucida Grande is a kind of Western-style sans serif font, which belongs to humanism. It is the default font for Apple's Mac OS X operating system. As a member of the Lucida Font family, its desig
the font are as follows:Copy CodeThe code is as follows:Font-style:italic;Font-variant:small-caps;Font-weight:bold;Font-size:1em;line-height:140%;font-family: "Lucida Grande", Sans-serif;can be abbreviated as a sentence:Copy CodeThe code is as follows:Font:italic small-caps Bold 1em/140% "Lucida Grande", Sans-serif;No
/ahr0cdovl2jsb2cuy3nkbi5uzxqvy3axmdax/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70 /gravity/southeast ">Assume that the unity default dynamic font arial is used. The explanation for this is that the default font for the current platform will be used by default after publishing to a different platform.In the test when the Millet 1 on the machine, the low version number MIUI system can not display Chinese characters, there is a high version of MIUI millet phone can display Arial,simei
follows:Margin: 1em 0 2em 0.5em;Border (border)The border attributes are as follows:Border-width: 1px;Border-style: solid;Border-color: #000;It can be abbreviated as border: 1px solid #000;Syntax: border: width style color;Background (Backgrounds)The attributes of the background are as follows:Background-color: # f00;Background-image: url(background.gif );Background-repeat: no-repeat;Background-attachment: fixed;Background-position: 0 0;It can be abbreviated as: background: # f00 url(background
: #000;
It can be abbreviated as border: 1px solid #000;
Syntax: border: width style color;
Background (Backgrounds)
The attributes of the background are as follows:
Background-color: # f00;
Background-image: url(background.gif );
Background-repeat: no-repeat;
Background-attachment: fixed;
Background-position: 0 0;
It can be abbreviated as: background: # f00 url(background.gif) no-repeat fixed 0 0;
The syntax is background: color image repeat attachment position;
You can omit one or mo
example:
Background:url ("Images/***.gif") #333;
can be written as
Background:url (images/***.gif) #333;
If you add quotes, it can cause some browser errors.
11. Group Selector (selectors)
When some element types, classes, or IDs have common attributes, you can use the group selector to avoid multiple duplicate definitions. This can save a lot of bytes.
For example, to define the font, color, and margin of all headings, you can write this:
H1,h2,h3,h4,h5,h6 {font-family: "
, such as line-height:150%; Color Sets the text color (note is not font-color), such as color:red; Font-family set fonts, such as font-family: "Lucida Grande", Verdana, Lucida, Arial, Helvetica, XXFarEastFont-Franklin, Sans-serif; (This is a common notation) All of the above can be written in one line of the Font property (except that the color property needs
to use embedding:
* This style sheet is used only on this page
* User is still using IE3
* Designers constantly modify the style sheet, need to see the effect immediately
3. Inline (plus style attributes on elements)
To specify a font for the entire site:
* Body {font-family: "Lucida Grande", Verdana, Lucida, Arial, Helvetica, Sans-serif;}
* The name of a font c
method to replace the above Code
The style definition is:
# Subnav {/* some styling */}# Subnav Li {/* some styling */}# Subnav A {/* some styling */}# Subnav. Sel {/* some styling */}# Subnav. Sel A {/* some styling */}
Using a sub-selector can make your code and CSS more concise and easier to read.10. Do not quote the background image path
To reduce the number of bytes, we recommend that you do not quote the path of the background image because the quotation marks are not required. For examp
1. How to set text font, color, and size-Use font
Font-style: Set italic, for example, font-style: italic;Font-weight: Specifies the text width, for example, font-weight: bold;Font-size: Set the text size, for example, font-size: 12px; (or 9pt, refer to the CSS manual for different unit display issues)Line-Height: Set line spacing, for example, line-Height: 150%;Color sets the text color (note that it is not font-color), such as color: red;Font-family: font-family: "
colors (note not font-color), such as color:red;
Font-family set fonts, such as font-family: "Lucida Grande", Verdana, Lucida, Arial, Helvetica, song-style, Sans-serif;
All of the above can be written in one line of the Font property (except for the color property that needs to be written separately):
Font:italic bold 12px/150% "
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.