Spring.Into.HTML.and.CSS [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Spring.Into.HTML.and.CSS [Electronic resources] - نسخه متنی

Barry J. Rosenberg

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید






Coloring Text


This is the easy part! Text color uses the color: property, which, as you can see, does not have a font or text prefix.Chapter 8, "Working with Color and Images Using CSS," where I applied the color property in numerous cases and discussed color values at length.

I want to color up the text a bit, so I'm going to apply color to my existing styles (see Example 9-4).

Example 9-4. Coloring the text


body {font-family: Georgia, Times, serif; font-size: 1em; font-weight: normal; color: black;}
h1, h2 {font-family: Arial, Helvetica, sans-serif;}
h1 {font-size: 150%; font-weight: bold; color: #999;}
h2 {font-size: 130%; font-weight: lighter; font-style: italic; color: #333;}
.accent {font-weight: 700; color: red;}

You can see the headers change color in Figure 9-7.

Figure 9-7. Applying color to the body, H1, h2, and class selectors.

[View full size image]

Of course, you can't see the red accent color applied to the accent class because of the nature of this book, but be sure to write up your styles and fire up your browser to check it out for yourself.


/ 171