The Book of CSS3 - A Developer\'s Guide to the Future of Web Design (2nd edition)
38 Chapter 4 Figure 4-4: Applying the :first-child and :last-child selectors Now let’s see the difference when we use the :first ...
Pseudo-classes and Pseudo-elements 39 :only-child and :only-of-type These two pseudo-classes are used to select elements in the ...
40 Chapter 4 :target On the Web, sites don’t just link between pages but also provide internal links to specific elements. A URI ...
Pseudo-classes and Pseudo-elements 41 Figure 4-7: Highlighting applied with the :target pseudo-class :empty The :empty pseudo-cl ...
42 Chapter 4 Let’s say you’re creating a base style sheet and want to set a property on the html element, which shouldn’t be alt ...
Pseudo-classes and Pseudo-elements 43 UI Element States Elements relating to forms and user input can have various states; they ...
44 Chapter 4 I’m not giving a demonstration of the checked state here, as most browsers have different interpretations of which ...
Pseudo-classes and Pseudo-elements 45 Finally, some HTML5 elements can have a permitted range of values, set by using the min an ...
46 Chapter 4 Figure 4-9 shows a comparison of the system-native ::selection colors (top) and the colors I’ve applied with the :: ...
5 Web Fonts The features covered in this chapter are the oldest in this book, having been intro- duced in CSS2 many years ago—on ...
48 Chapter 5 The CSS Fonts Module Level 3 (http://www.w3.org/TR/css3-fonts/) has Candidate Recommendation status, and most of th ...
Web Fonts 49 To illustrate a real-world example, I’ll apply the Chunk font (available to download for free from http://www.thele ...
50 Chapter 5 bolder weight or an italic type, you have to define each font face individu- ally. To do this, you re-use the same ...
Web Fonts 51 For example, if you’re going to use an italic style in your page, you must be sure to also define an italic style i ...
52 Chapter 5 Using Local Fonts The local() value for the src property is used to check whether a user already has the defined fo ...
Web Fonts 53 Let me explain what’s happening here. The first font to be specified is the EOT () for Internet Explorer 8 and bel ...
54 Chapter 5 Most FaaS providers are commercial, allowing a limited set of fonts for free but charging a monthly or annual fee f ...
Web Fonts 55 I also left out some color and size adjustments to keep the code as read- able as possible. Here’s the markup I use ...
56 Chapter 5 More Font Properties The CSS3 Web Fonts Module doesn’t just re-introduce the @font-face rule; it also revives two o ...
Web Fonts 57 Figure 5-5: The effect of font-size-adjust on the Impact font (third line) You can clearly see the difference betwe ...
«
1
2
3
4
5
6
7
8
9
10
»
Free download pdf