CSS Mastery的笔记(31)

>我来写笔记

按有用程度 按页码先后 最新笔记

  • BruceChen

    BruceChen

    Summary To be able to style a particular HTML element using CSS, you need to have some way of targeting that element. In CSS the part of a style rule that does this is called the selector. Common selectors the m ost common kinds of selectors are type and descendant selectors. Type selectors are used to target a particular type of element, such as a paragraph or a heading element. Type selecto...

    2014-03-28 13:00

  • 传说中的路

    传说中的路 (世界这么大我想去看看)

    Breaking your CSS into multiple style sheets used to be a common approach and was the method I recommended in the first edition of this book. However, recent browser benchmarking has shown that importing style sheets can be slower than linking to them

    2012-12-21 16:27

  • 传说中的路

    传说中的路 (世界这么大我想去看看)

    To avoid too much confusion, I try to make sure my general styles are very general while my specific styles are as specific as possible and never need to be overridden. If I find that I have to override general styles several times, it’s simpler to remove the declaration that needs to be overridden from the more general rules and apply it explicitly to each element that needs it. 这里有好多的b...

    2012-12-21 16:06

  • 传说中的路

    传说中的路 (世界这么大我想去看看)

    If you ever come across a CSS rule that just doesn't seem to be working, you could be suffering from a specificity clash. Try making your selectors more specific by adding the ID of one of its parents. if that fixes the problem, you'll probably find that there is a more specific rule someware in your style sheet overriding what you're trying to do 了解Specificity有助于调CSS bug

    2012-12-21 16:02

  • 蝴蝶来过这世界

    蝴蝶来过这世界 (回归生活)

    Frameworks have another disadvantaged in the fact that they enforce a specific grid structure on your designs. This is fine if your designs happen to fit the widths and margins defined by the framework. However, just as it’s unacceptable for your programming framework to dictate the user experience of your website, it’s unacceptable for your CSS framework to dictate the design of your site. By s...

    2012-08-15 13:30

  • 蝴蝶来过这世界

    蝴蝶来过这世界 (回归生活)

    If you set a background position using pixels, the top-left corner of the image is positioned from the top-left corner of the element by the specified number of pixels. With percentage positioning, it is the corresponding point on the image that gets positioned. So if you set a vertical and horizontal position of 20 percent, you are actually positioning a point 20 percent from the top left of the ...

    2012-08-15 00:57

  • 蝴蝶来过这世界

    蝴蝶来过这世界 (回归生活)

    If you choose to use this technique, make sure that you only use it on things that are actually links and don’t update the server. Otherwise, you may experience some undesirable results. When Google accelerator launched, people found that content in their CMS or web application was mysteriously disappearing. Sometimes, the entire contents of a site would vanish overnight. It turns out that the au...

    2012-08-09 11:22

  • 蝴蝶来过这世界

    蝴蝶来过这世界 (回归生活)

    Say you have a picture that you want to float to the left of a block of text. You want this picture and text to be contained in another element with a background color and border. You would probably try something like this: /代码内容已省略/ However, because the floated elements are taken out of the flow of the document, the wrapper div takes up no space. How do y...

    2012-07-29 11:55

  • 蝴蝶来过这世界

    蝴蝶来过这世界 (回归生活)

    Inline boxes are laid out in a line horizontally. Their horizontal spacing can be adjusted using horizontal padding, borders, and margins (see Figure 3-9). However, vertical padding, borders, and margins will have no effect on the height of an inline box. Similarly, setting an explicit height or width on an inline box will have no effect either. The horizontal box formed by a line is called a line...

    2012-07-27 09:36

  • 蝴蝶来过这世界

    蝴蝶来过这世界 (回归生活)

    older versions of Internet Explorer, along with IE 6 in quirks mode, use their own,nonstandard box model. Instead of measuring just the width of the content, these browsers take the width property as the sum of the width of the content, padding, and borders. This actually makes a lot of sense, because in the real-world boxes have a fixed size, and the padding goes on the inside. The more padding y...

    2012-07-26 09:29

<前页 1 2 3 4 后页>

笔记是你写在书页留白边上的内容;是你阅读中的批注、摘抄及随感。

笔记必须是自己所写,不欢迎转载。摘抄原文的部分应该进行特殊标明。

CSS Mastery

>CSS Mastery