随笔分类 -  About CSS

摘要:1.If one declaration is from a style attribute, rather than a rule with a selector (an inline style), it has the highest specificity. If none of the declarations are inline, proceed to step two.2.Count the ID selectors .The declaration with the highest count has the highest specificity. If two or mo 阅读全文
posted @ 2012-02-28 17:08 HelloWorld.Michael 阅读(193) 评论(0) 推荐(0)
摘要:HTML normally flows from the top of the browser window down to the bottom,one headline, paragraph, or block-level element on top of another. This word-processor-like display is visually boring , but with CSS,you’re far from stuck with it. ——float.left. Slides the styled element to the left, while co 阅读全文
posted @ 2011-12-27 16:47 HelloWorld.Michael 阅读(149) 评论(0) 推荐(0)
摘要:Three different properties of each border: color, width, and style.Color :The color can be a hexadecimal number, a keyword, or an RGB value, just like with text.Width :A border’s width is the thickness of the line used to draw the border. You can use any CSS measurement type (except percentages) or 阅读全文
posted @ 2011-12-27 15:11 HelloWorld.Michael 阅读(193) 评论(0) 推荐(0)
摘要:When the content inside a styled tag is larger than the style’s defined width and height, some weird things happen.Fortunately, you can control what a browser should do in this situation with the overflow property. Overflow accepts four keywords that control how content that overflows the edges of a 阅读全文
posted @ 2011-12-27 15:11 HelloWorld.Michael 阅读(99) 评论(0) 推荐(0)
摘要:To a browser, any tag is a box with something inside it—text, an image,or even other tags containing other things, as illustrated in below Figure .Surrounding the content are different properties that make up the box:padding is the space between the content and the content’s border. Padding is what 阅读全文
posted @ 2011-12-27 14:00 HelloWorld.Michael 阅读(161) 评论(0) 推荐(0)
摘要:CSS provides a formula for determining a style’s specificity that’s based on a value assigned to the style’s selector—a tag selector, class selector, ID selector, and so on. Here’s how the system works:A tag selector is worth 1 point.A class selector is worth 10 points.An ID selector is worth 100 po 阅读全文
posted @ 2011-12-27 13:29 HelloWorld.Michael 阅读(158) 评论(0) 推荐(0)
摘要:CSS offers a shorthand property called font, which lets you combine the following properties into a single line: font-style ,font-variant ,font-weight , font-size , line-height , and font-family .You don’t have to include every one of these properties, but you must include the font size and font fam 阅读全文
posted @ 2011-12-27 13:05 HelloWorld.Michael 阅读(159) 评论(0) 推荐(0)
摘要:Serif fontsSerif fonts are best for long passages of text, as it’s widely believed that the serifs—those tiny “feet” at the end of a letter’s main strokes—gently lead the eye from letterto letter, making text easier to read.• “Times New Roman”, Times, serif• Georgia, “Times New Roman”, Times, serif• 阅读全文
posted @ 2011-12-13 12:53 HelloWorld.Michael 阅读(210) 评论(0) 推荐(0)