買這商品的人也買了...
-
$680$537 -
$875Visual Basic .NET Developer's Guide to ASP.NET, XML and ADO.NET
-
$2,250$2,138 -
$990$782 -
$350$277 -
$1,120$1,098 -
$880$695 -
$1,600$1,520 -
$780$663 -
$650$507 -
$2,230$2,119 -
$1,330$1,264 -
$750$593 -
$1,420$1,349 -
$680$537 -
$580$493 -
$1,880$1,786 -
$580$452 -
$860$731 -
$2,375Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using NVM Devices
-
$300$285 -
$490$387 -
$300$270 -
$1,920$1,824 -
$450$356
相關主題
商品描述
Description
As the industry standard method for enriching the presentation of HTML-based web pages, Cascading Style Sheets (CSS) allow you to give web pages more structure and a more sophisticated look. But first, you have to get past CSS theory and resolve real-world problems.
For those all-too-common dilemmas that crop up with each project, CSS Cookbook provides hundreds of practical examples with CSS code recipes that you can use immediately to format your web pages. Arranged in a quick-lookup format for easy reference, the second edition has been updated to explain the unique behavior of the latest browsers: Microsoft's IE 7 and Mozilla's Firefox 1.5. Also, the book has been expanded to cover the interaction of CSS and images and now includes more recipes for beginning CSS users. The explanation that accompanies each recipe enables you to customize the formatting for your specific needs. With topics that range from basic web typography and page layout to techniques for formatting lists, forms, and tables, this book is a must-have companion, regardless of your experience with Cascading Style Sheets.
Table of Contents
Preface
1. General
1.1 Using CSS with HTML
1.2 Using Different Selectors to Apply Styles
1.3 Determining When to Use Class and ID Selectors
1.4 Understanding CSS Properties
1.5 Understanding the Box Model
1.6 Understanding DOCTYPES and Effects on Browser Layout
1.7 Associating Styles to a Web Page
1.8 How to Use Different Types of Style Sheets
1.9 Adding Comments Within CSS
1.10 Organizing the Contents of a Style Sheet
1.11 Organizing Style Sheet Files
1.12 Working with Shorthand Properties
1.13 Setting up an Alternate Style Sheet
1.14 Using Floats with Images
1.15 Using Absolute Positioning
1.16 Using Relative Positioning
1.17 Using CSS in Adobe Dreamweaver
1.18 Using CSS in Microsoft Expression Web Designer
2. Web Typography
2.1 Specifying Fonts
2.2 Specifying Font Measurements and Sizes
2.3 Gaining More Control over Font Sizes
2.4 Enforcing Font Sizes
2.5 Centering Text
2.6 Setting Text to Be Justified
2.7 Removing Space Between Headings and Paragraphs
2.8 Setting a Simple Initial Cap
2.9 Setting a Larger, Centered Initial Cap
2.10 Setting an Initial Cap with Decoration (Imagery)
2.11 Creating a Heading with Stylized Text
2.12 Creating a Heading with Stylized Text and Borders
2.13 Stylizing a Heading with Text and an Image
2.14 Creating a Pull Quote with HTML Text
2.15 Creating a Pull Quote with Borders
2.16 Creating a Pull Quote with Images
2.17 Setting the Indent in the First Line of a Paragraph
2.18 Setting the Indent of Entire Paragraphs
2.19 Creating a Hanging Indent
2.20 Styling the First Line of a Paragraph
2.21 Styling the First Line of a Paragraph with an Image
2.22 Creating a Highlighted Text Effect
2.23 Changing Line Spacing
2.24 Adding a Graphic Treatment to HTML Text
2.25 Placing Shadow Behind Text
2.26 Adjusting the Spacing Between Letters and Words
3. Images
3.1 Placing a Border Around an Image
3.2 Removing Borders Set on Images by Default in Some Browsers
3.3 Setting a Background Image
3.4 Creating a Line of Background Images
3.5 Placing a Background Image on a Web Page
3.6 Using Multiple Background Images on One Selector
3.7 Creating a Stationary Background Image
3.8 Overlaying HTML Text on an Image
3.9 Replacing HTML Text with an Image
3.10 Replacing HTML Text with Flash Text
3.11 Using Multiple PNGs with Transparency
3.12 Building a Panoramic Image Presentation
3.13 Combining Different Image Formats
3.14 Rounding Corners with Fixed-Width Columns
3.15 Rounding Corners (Sliding Doors Technique)
3.16 Rounding Corners (Mountaintop Technique)
3.17 Rounding Corners with JavaScript
3.18 Placing a Drop Shadow Behind an Image
3.19 Placing a Smooth Drop Shadow Behind an Image
3.20 Making Images Scalable
3.21 Making Word Balloons
3.22 Hindering People from Stealing Your Images
3.23 Inserting Reflections on Images Automatically
3.24 Using Image Sprites
4. Page Elements
4.1 Eliminating Page Margins
4.2 Coloring the Scrollbar
4.3 Techniques for Centering Elements on a Web Page
4.4 Placing a Page Border
4.5 Customizing a Horizontal Rule
4.6 Adding a Lightbox
5. Lists
5.1 Changing the Format of a List
5.2 Writing Cross-Browser Indentation in Lists
5.3 Place Dividers Between List Items
5.4 Creating Custom Text Markers for Lists
5.5 Creating Custom Image Markers for Lists
5.6 Inserting Large Custom Image Markers for Lists
5.7 Making a List Presentation Rich with Imagery
5.8 Creating Inline Lists
5.9 Making Hanging Indents in a List
5.10 Moving the Marker Inside the List
6. Links and Navigation
6.1 Removing Underlines from Links (and Adding Other Decorations)
6.2 Changing Link Colors
6.3 Changing Link Colors in Different Sections of a Page
6.4 Placing an Icon at the End of the Link
6.5 Changing Cursors
6.6 Creating Rollovers Without JavaScript
6.7 Creating Text Navigation Menus and Rollovers
6.8 Building Horizontal Navigation Menus
6.9 Building a Navigation Menu with Access Keys
6.10 Creating Breadcrumb Navigation
6.11 Creating Image-Based Rollovers
6.12 Creating Collapsible Menus
6.13 Creating Contextual Menus
6.14 Making Tool Tips with the Title Attribute
6.15 Designing a Dynamic Visual Menu
6.16 Apply Styles Dynamically to a Web Page
7. Forms
7.1 Modifying the Spacing Around a Form
7.2 Setting Styles for Input Elements
7.3 Applying Different Styles to Different Input Elements in the Same Form
7.4 Setting Styles for textarea Elements
7.5 Setting Styles for Select and Option Elements
7.6 Creating a Macintosh-Styled Search Field
7.7 Styling Form Buttons
7.8 Creating an Image Submit Button
7.9 Setting Up a Submit-Once-Only Button
7.10 Creating a Submit Button That Looks Like HTML Text
7.11 Making an HTML Text Link Operate Like a Submit Button
7.12 Designing a Web Form Without Tables
7.13 Designing a Two Column Form Without Tables
7.14 Highlighting Form Fields
7.15 Integrating Form Feedback with a Form
7.16 Styling Access Keys in Web Forms
7.17 Grouping Common Form Elements
7.18 Entering Data into a Form Like a Spreadsheet
7.19 Sample Design: A Login Form
7.20 Sample Design: A Registration Form
8. Tables
8.1 Setting the Cell Spacing
8.2 Setting the Borders and Cell Padding
8.3 Setting the Style for Caption
8.4 Setting the Styles Within Table Cells
8.5 Setting Styles for Table Header Elements
8.6 Removing Gaps from Images Placed in Table Cells
8.7 Eliminating Gaps Between Table Cells
8.8 Creating Alternating Background Colors in Table Rows
8.9 Adding a Highlighting Effect on a Table Row
8.10 Sample Design: An Elegant Calendar
9. Page Layouts
9.1 Building a One-Column Layout
9.2 Building a Two-Column Layout
9.3 Building a Two-Column Layout with Fixed-Width Columns
9.4 Creating a Flexible Multicolumn Layout with Floats
9.5 Creating a Fixed-Width Multicolumn Layout with Floats
9.6 Creating a Flexible Multicolumn Layout with Positioning
9.7 Creating a Fixed-Width Multicolumn Layout with Positioning
9.8 Using Floats to Display Columns in Any Order
9.9 Designing an Asymmetric Layout
10. Print
10.1 Creating a Printer-Friendly Page
10.2 Making a Web Form Print-Ready
10.3 Displaying URIs After Links
10.4 Inserting Special Characters Before Links
10.5 Sample Design: A Printer-Friendly Page with CSS
11. Hacks, Workarounds, and Troubleshooting
11.1 Isolating Styles for Netscape Navigator 4.x
11.2 Delivering Specific Styles to Internet Explorer 5.x for Windows
11.3 Removing Web Page Flicker in Internet Explorer 5.x for Windows
11.4 Keeping Background Images Stationary in Internet Explorer 6 for Windows
11.5 Using Internet Explorer for Windows' Conditional Comments to Deliver Styles
11.6 Keeping CSS Rules from Internet Explorer 5 for Macintosh
11.7 Setting Up an Intelligent Hack Management System
11.8 Diagnosing CSS Bugs and Browser Issues
11.9 Testing a Site Design on More Than One Platform with Only One Computer
11.10 Installing More Than One Version of Internet Explorer for Windows on a Computer
11.11 Testing a Web Site with a Text Browser
12. Designing with CSS
12.1 Enlarging Text Excessively
12.2 Creating Unexpected Incongruity
12.3 Combining Unlike Elements to Create Contrast
12.4 Leading the Eye with Contrast
12.5 Checking for Enough Color Contrast
12.6 Emphasizing a Quotation
A. Resources
B. CSS 2.1 Properties and Proprietary Extensions
C. CSS 2.1 Selectors, Pseudo-Classes, and Pseudo-Elements
D. Styling of Form Elements
Index
商品描述(中文翻譯)
**描述**
作為豐富基於 HTML 的網頁呈現的行業標準方法,層疊樣式表(Cascading Style Sheets, CSS)允許您為網頁提供更多結構和更精緻的外觀。但首先,您必須克服 CSS 理論並解決現實世界中的問題。
對於每個專案中經常出現的那些困境,《CSS 食譜》提供了數百個實用範例,包含可以立即使用的 CSS 代碼食譜來格式化您的網頁。第二版以快速查閱格式進行排列,便於參考,並已更新以解釋最新瀏覽器的獨特行為:微軟的 IE 7 和 Mozilla 的 Firefox 1.5。此外,本書還擴展了 CSS 與圖像的互動,並新增了更多針對初學者的 CSS 食譜。每個食譜附帶的解釋使您能夠根據特定需求自定義格式。涵蓋從基本的網頁排版和頁面佈局到格式化列表、表單和表格的技術,這本書是無論您對層疊樣式表的經驗如何,都必備的伴侶。
**目錄**
前言
1. 一般
1.1 使用 CSS 與 HTML
1.2 使用不同的選擇器應用樣式
1.3 確定何時使用類別和 ID 選擇器
1.4 理解 CSS 屬性
1.5 理解盒模型
1.6 理解 DOCTYPE 和對瀏覽器佈局的影響
1.7 將樣式關聯到網頁
1.8 如何使用不同類型的樣式表
1.9 在 CSS 中添加註解
1.10 組織樣式表的內容
1.11 組織樣式表文件
1.12 使用簡寫屬性
1.13 設置替代樣式表
1.14 使用浮動與圖像
1.15 使用絕對定位
1.16 使用相對定位
1.17 在 Adobe Dreamweaver 中使用 CSS
1.18 在 Microsoft Expression Web Designer 中使用 CSS
2. 網頁排版
2.1 指定字體
2.2 指定字體測量和大小
2.3 獲得對字體大小的更多控制
2.4 強制字體大小
2.5 置中文本
2.6 設置文本為對齊
2.7 移除標題與段落之間的空間
2.8 設置簡單的首字母大寫
2.9 設置較大且置中的首字母大寫
2.10 設置帶裝飾的首字母大寫(圖像)
2.11 創建帶有風格化文本的標題
2.12 創建帶有風格化文本和邊框的標題
2.13 用文本和圖像風格化標題
2.14 創建帶有 HTML 文本的引用
2.15 創建帶有邊框的引用
2.16 創建帶有圖像的引用
2.17 設置段落第一行的縮排
2.18 設置整個段落的縮排
2.19 創建懸掛縮排
2.20 風格化段落的第一行
2.21 用圖像風格化段落的第一行
2.22 創建高亮文本效果
2.23 更改行距
2.24 為 HTML 文本添加圖形處理
2.25 在文本後放置陰影
2.26 調整字母和單詞之間的間距
3. 圖像
3.1 在圖像周圍放置邊框
3.2 移除某些瀏覽器預設的圖像邊框
3.3 設置背景圖像
3.4 創建一行背景圖像
3.5 在網頁上放置背景圖像
3.6 在一個選擇器上使用多個背景圖像
3.7 創建靜止的背景圖像
3.8 在圖像上疊加 HTML 文本
3.9 用圖像替換 HTML 文本
3.10 用 Flash 文本替換 HTML 文本
3.11 使用多個透明 PNG
3.12 建立全景圖像展示
3.13 組合不同的圖像格式
3.14 使用固定寬度列圓角
3.15 圓角(滑動門技術)
3.16 圓角(山頂技術)
3.17 使用 JavaScript 圓角
3.18 在圖像後放置投影
3.19 在圖像後放置平滑的投影
3.20 使圖像可縮放
3.21 創建對話框氣泡
3.22 阻止他人盜用您的圖像
3.23 自動在圖像上插入反射
3.24 使用圖像精靈
4. 頁面元素
4.1 消除頁面邊距
4.2 為滾動條上色
4.3 在網頁上置中元素的技術
4.4 放置頁面邊框
4.5 自定義水平規則
4.6 添加燈箱
5. 列表
5.1 更改列表格式
5.2 在列表中撰寫跨瀏覽器縮排
5.3 在列表項目之間放置分隔符
5.4 為列表創建自定義文本標記
5.5 為列表創建自定義圖像標記
5.6 插入大型自定義圖像標記
5.7 使列表展示豐富的圖像
5.8 創建內聯列表
5.9 在列表中製作懸掛縮排
5.10 將標記移入列表內部
6. 連結與導航
6.1 移除連結的下劃線(並添加其他裝飾)
6.2 更改連結顏色
6.3 更改頁面不同區域的連結顏色
6.4 在連結末尾放置圖標
6.5 更改游標
6.6 創建無需 JavaScript 的滑鼠懸停效果
6.7 創建文本導航菜單和滑鼠懸停效果
6.8 建立水平導航菜單
6.9 建立帶有存取鍵的導航菜單
6.10 創建麵包屑導航
6.11 創建基於圖像的滑鼠懸停效果
6.12 創建可折疊菜單
6.13 創建上下文菜單
6.14 使用標題屬性製作工具提示
6.15 設計動態視覺菜單
6.16 動態應用樣式到網頁
7. 表單
7.1 修改表單周圍的間距
7.2 設置輸入元素的樣式
7.3 在同一表單中對不同輸入元素應用不同樣式
7.4 設置 textarea 元素的樣式
7.5 設置選擇和選項元素的樣式
7.6 創建 Macintosh 風格的搜索框
7.7 風格化表單按鈕
7.8 創建圖像提交按鈕
7.9 設置一次性提交按鈕
7.10 創建看起來像 HTML 文本的提交按鈕
7.11 使 HTML 文本鏈接像提交按鈕一樣運作
7.12 設計無表格的網頁表單
7.13 設計無表格的兩欄表單
7.14 突出顯示表單字段
7.15 將表單反饋整合到表單中
7.16 在網頁表單中風格化存取鍵
7.17 將常見表單元素分組
7.18 像電子表格一樣在表單中輸入數據
7.19 範例設計:登錄表單
7.20 範例設計:註冊表單
8. 表格
8.1 設置單元格間距
8.2 設置邊框和單元格內邊距
8.3 設置標題的樣式
8.4 設置表格單元格內的樣式
8.5 設置表格標頭元素的樣式
8.6 移除放置在表格單元格中的圖像的間隙
8.7 消除表格單元格之間的間隙
8.8 在表格行中創建交替背景顏色
8.9 在表格行上添加高亮效果
8.10 範例設計:優雅的日曆
9. 頁面佈局
9.1 建立單欄佈局