Danh mục

Sams Teach Yourself CSS in 24 Hours- P2

Số trang: 50      Loại file: pdf      Dung lượng: 2.35 MB      Lượt xem: 13      Lượt tải: 0    
tailieu_vip

Xem trước 5 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Sams Teach Yourself CSS in 24 Hours- P2: Times have changed, thankfully, since those Dark Ages of CSS. All major browsers aswell as some minor ones have increased support for Cascading Style Sheets in the latestversions. Web developers are aware of CSS and the vital role they play in designing greatWeb pages, and presumably you’ve got some idea of how important they are if you’vebought this book.
Nội dung trích xuất từ tài liệu:
Sams Teach Yourself CSS in 24 Hours- P232 Hour 2 If the name of the font family has more than one word, enclose it in quotes. Here are some examples of CSS rules using font-family: body { font-family: Arial, sans-serif; } h1 { font-family: “Courier New”, monospace; } h2 { font-family: “Times New Roman”, serif; } You’ll learn more about font families and how to use them in Hour 8. A Simple Style Sheet Using just the simple properties and values you’ve learned so far this hour, you already can create a basic style sheet; an example of a complete style sheet is shown in Listing 2.1. LISTING 2.1 A Basic Style Sheet with Color, Size, and Font Declarations /* basic-2.1.css */ /* Written by Kynn Bartlett */ body { font-family: Arial; color: black; background-color: white; } /* I think Verdana looks nice for headlines */ h1, h2, h3, h4, h5, h6 { font-family: Verdana, sans-serif; } /* This puts the second level heading in red */ h2 { color: red; } address { font-family: Verdana, sans-serif; font-size: smaller; } You can find a copy of this style sheet on the Web at http://CSSin24hours.com/02/basic-2.1.css. Linking a Style Sheet to an HTML Page A style sheet by itself doesn’t really do anything except sit there on your hard drive or Web server. If you try to load it in your browser, it will just display as plain text. To actu- ally use the CSS rules, you need to have a file with markup, such as an HTML page, and you need to add an HTML tag to link the CSS file to the Web page. A Simple HTML Page for Styling Listing 2.2 shows the structure of a basic HTML page like one you might find on the Web; it has headlines, paragraphs, horizontal rules, and even a little table on the side. You Getting Started with CSS 33 can download a copy of this file from http://CSSin24hours.com/02/basic-2.2.html because that’s easier than typing in the whole thing.LISTING 2.2 A Simple HTML File That Needs Styling 2 Review - The Lord of the Rings: Fellowship of the Ring Movie Review Rating Scale One * Not recommended Two ** Mediocre Three *** Above Average Four **** Highly Recommended Five ***** A Must-See! The Lord of the Rings: Fellowship of the Ring Rating: Four **** This movie perfectly captures the feelings of reading The Lord of the Rings books by J.R.R. Tolkien — large, impressive, fantastic, and mythic, but also large, ponderous, slow, and meandering. Now, I like the original books as much as any other Science-fiction and fantasy fan, despite getting only halfway through the second of three books before giving up. Nevertheless, I gaped in awe at the majestic landscapes of Middle Earth depicted on the big screen rather than only in my imagination. I saw elves, hobbits, wizards, dwarves, orcs, and even a few humans come to life, and it all felt right — but it also felt very long, nearly 3 hours in length, even with the plot pared down for the movie. continues34 Hour 2 LISTING 2.2 Continued Some story points were inexplicably confusing; bit characters wander off and onto the screen, and none ever stop to really explain what the big deal is about the ring. If I hadn’t read the first book already, I might have been scratching my head in confusion. But ultimately, Fellowship of the Ring is a treat designed especially for anyone who loves Tolkien’s epic work of mythic fantasy; it’s a faithful, if exhausting, adaptation of this 20th-century classic. Reviewed by Kynn Bartlett As seen in the screenshot in Figure 2.3, ...

Tài liệu được xem nhiều: