Chapter 19 Answers

  1. The CSS3 operators ^, $, and * respectively match the start, end, or any portion of a string.

  2. The property you use to specify the size of a background image is background-size, like this: background-size:800px 600px;.

  3. You can specify the radius of a border using the border-radius property, like this: border-radius:20px;.

  4. To flow text over multiple columns, you use the column-count, column-gap, and column-rule properties or their browser-specific variants, like this: column-count:3; column-gap:1em; column-rule:1px solid black;.

  5. The four functions with which you can specify CSS colors are hsl, hsla, rgb, and rgba. For example: color:rgba(0%,60%,40%,0.4);.

  6. To create a gray text shadow under some text, offset diagonally to the bottom right by 5 pixels, with a blurring of 3 pixels, you would use this declaration: text-shadow:5px 5px 3px #888;.

  7. You can indicate with an ellipsis that text is truncated using this declaration: text-overflow:ellipsis;.

  8. To include a Google web font in a web page, first select it from http://google.com/webfonts. Then, assuming, for example, you chose “Lobster,” you include it in a <link> tag, like this: <link href='http://fonts.googleapis.com/css?family=Lobster' />. You must also refer to the font in a CSS declaration such as this: h1 { font-family:'Lobster', arial, serif; }.

  9. The CSS declaration you would use to rotate an object by 90 degrees is transform:rotate(90deg);.

  10. To set up a transition on an object so that when any of its properties are changed the change will transition immediately in a linear fashion over the course of half a second, you would use this declaration: transition:all .5s linear;.