--by Livingston, Dan, and Brown, Micah
本书介绍 Book Description
·CSS和DHTML近来取得的成果 ·全面更新了最新的技术和代码样例 ·可以下载实际证明有效的样例来从实例学习 ·解决方案，电子商务，搜索，广告，测试，以及交互浏览的代码 ·建立下载速度快，设计新潮，运行畅通的站点
·样式表基础，<STYLE>, <DIV>, Z-Index stacking, and <SPAN>
前言 致谢 作者简介 1. 什么是CSS和DHTML 2. CSS样式表 样式表概览，怎样分级，如何建立样式和级，链接到外部样式表，定位层，修改HTML标签等 3. DHTML起步 页面结构，交互浏览代码，隐藏和显示层，全面的二级导航，以及其他的好方法 4. 动态层（层叠菜单） 5. 拖动层 6. 交互测试 7. 特别的恶作剧（原文中的the Shelley Quiz不太理解，翻译成了“恶作剧”） 附录A：CSS样式属性代码参考 附录B：各种参考手册（包括优站的源码，外部样式表，定为属性，度量单位，色卡） 附录C：JS参考 附录D：Netscape4 和IE4的DOM对照 附录E：Netscape5 和IE6的DOM快查RooZeno译自：Prentic Hall
When I first started learning DHTML, there were two kinds of books on the market: overly simplified, cutesy books that were appropriate for technophobe junior high schoolers, and huge reference tomes that had their own gravity. But nothing really taught me how to build pages for real clients using CSS and DHMTL.
This book will guide you through CSS (also called "style-sheets") and DHTML, using examples and techniques taken straight from my experience as a Web designer and programmer. I'll start off with basic concepts and simple examples and work up to more sophisticated effects and functionality.
Who This Book Is For
How This Book Is Laid Out
The first code-heavy chapter covers CSS in all of its useful forms with a myriad of examples. The rest of the chapters focus on DHTML by presenting a real-world task and walking you through it step by step. All of the examples are for one of two fictional companies: Shelley Biotechnologies or Stitch, an online fashion magazine (like every other book in this series).
The exercises and examples are designed to give you a solid, market-ready foundation in DHTML and enough expertise in practical solutions to carry you through 90% of the DHTML projects you'll do. You'll find there's often more than one way to accomplish a feat in DHTML, which is fine—there is no right or wrong in coding.
All of the code, images, and working examples are available for download and viewing on www.wire-man.com/dhtml2 and www.phptr.com/essential.
Special for Second Edition
I am delighted to be able to write a second edition of this book. I've received hundreds of emails from readers of the first edition—some good, some bad. I have implemented many of the suggested changes, and kept the things people liked. I think the book is much stronger for it. If you have any questions or comments, feel free to drop me a line at email@example.com—I'd love to hear from you.
○ What Are CSS and DHTML?
CSS stands for "cascading stylesheets," but we'll just be calling them "stylesheets" from now on. For all practical purposes, stylesheets are as much a part of HTML as the <img>and <table> tags. Adding stylesheet information to a page is just a matter of typing in some extra code. There's nothing fancy about it.
Placing stylesheet information into a Web page lets you set certain aspects of that HTML page. For example, your stylesheet could say, "Make all of the text in this Web page 16 point bold Arial," or "There's a layer called 'banner' and it's located at 60 pixels over and 90 pixels down," or even "When the <b> tag is used, make that text both bold and italic." CSS is a standard created by the World Wide Web Consortium, the same folks who define exactly what HTML is. There are several versions of CSS (the third version, CSS3, is being worked on right now). The browsers all implement variations of the first two versions, CSS1 and CSS2. You don't need to be concerned about them in this book—we'll look at what works without worrying about which version it is.
○ What Can CSS Do?
Stylesheets can do three things:
::.Set the font of text on a page
::. Define a layer and position it on the page
::. Modify HTML tags
If you decide to use stylesheets to set your page's fonts, you can define different classes of fonts, like "headlineText" or "footerText" or "mainBodyText," and use different fonts for all three. This may not sound exciting, but if used properly, this can save you hours and hours that you'd otherwise spend using the nasty and decrepit <font>tag.
○ When Is CSS Really Used?
Stylesheets are really used only for the first two items above: setting fonts and positioning layers. You can use stylesheets to modify HTML tags, but I (and most other Web developers) haven't found that to be very useful. It tends to confuse more than to facilitate. So, I'll be concentrating mostly on using stylesheets to set fonts and position layers throughout this book. I'll show you how to modify tags, but there won't be a lot of examples—that would be like showing you the proper way to ride a bicycle underwater. I'll show you how to do it, but an extended tour wouldn't serve any real purpose.
○ What Is DHTML?
○ What Can DHTML Do?
DHTML can do all sorts of really interesting and fun things. You can create little games, sliding pop-up menus, draggable images, interactive quizzes, and the like. Internet Explorer (IE), especially, has all sorts of great extensions that will let you get pretty creative. There's no end to the things you can do.
○ The Limitations of DHTML
I bring up this story as a potential warning: If you get really fancy with DHTML, you will pay. Development time to make your code work on the various browsers and platforms will take way longer than it should. If you think you're done, look at your page on a Macintosh running IE 4.5.
Everything in this book is fully cross-browser and cross-platform. In fact, I'm ignoring everything that's Netscape-specific or IE-specific. As of this writing, Netscape hasn't completely lost the browser war yet, so Netscape users must still be considered. Also, Netscape 6 is less popular than expected, so Netscape 4.x users must still be considered and coded for.
○ When to Use DHTML
To be honest, I only use DHTML to make layers appear and disappear, and for simple animation. However, not everyone has such pedestrian ambitions for their DHTML, so you'll find examples that go beyond those few uses in this book. In fact, I expect to see a lot more DHTML on the Web fairly soon, now that almost everyone has Netscape 4.7+ and IE 5.x. All the browser metrics I've seen indicate that at least 95% of Web surfers have a 4.0+ browser.
When you start to code your own DHTML, start small and simple. It's easy to make large promises to a client, and as a brilliant programmer, I'm sure you'll deliver on them, but you'll save yourself a lot of heartache and late nights if you build your pages in incremental phases.
--Eric A. Meyer
作者介绍 About the Author：
Eric A. Meyer, regarded by many as the most experienced CSS master working today, pairs his knowledge of CSS, HTML, and browser capabilities with a carefully developed hands-on-learning method to provide you with 10 full-color projects that help you learn through example rather than theory.
::. 认识就够 和表现 ::. 将表格转变为样式表的层叠 ::. 揉合多种技术来创造多字的设计 ::. 在经典的方法中使用基础的列表 ::. 打印和屏幕显示的风格化RooZeno译自：EricMeyeronCSS
书目简录Table of Contents：
1 转变现有的页面 2 玩转图片 3 玩转财务报表 4 定位背景 5 纵向列表菜单 6 CSS控制下拉菜单 7 初识吸引人的制表符 8 玩转网络日志 9 设计主页 10 设计发挥RooZeno译自：EricMeyeronCSS
此外，DMXZone上还有篇对作者的专访Interview with Eric Meyer: Death of Netscape, CSS, Standards and Star Wars ，很精彩，建议对CSS和网络标准（W3C）有兴趣的可以去看看，采访有5页哟，等俺有空再慢慢译过来。