CP202 Lecture 4: CSS Background and Color

40 views5 pages
19 Dec 2015
School
Course
Professor

Document Summary

Colors (note the american spelling) can be set for almost any html element that does not already have its own color (i. e. an image). Colors can be foreground or background. color: [color] The [color] value can be assigned in a number of different ways, three of which are: as a named color (where supported), ex: blue as an rgb triplet #rrggbb, ex: #990099 as an rgb percentage triplet rgb(r%,g%,b%), ex: rgb(60%,0%,60%) We examined the first two approaches in detail in the color notes. The third is simply an alternative method that uses percentage values for red, green, and blue to define colors. cb01 { color: red; border: thin #990099 solid; Backgrounds may be a color, an image, or both. Backgrounds have a short-hand syntax available similar to that for borders: background: color image repeat attachment position; Not all of the options are required and each can be individually set.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents