相關主題
商品描述
While flowing text around images is certainly nothing new, with CSS you can float any element, from images to paragraphs to lists. In this practical guide, author Eric Meyer reveals some interesting—and surprising—ways to use CSS floats in your web design, including the latest capability to flow content past non-rectangular float shapes.
Short and sweet, this book is an excerpt from the upcoming fourth edition of CSS: The Definitive Guide. When you purchase either the print or the ebook edition of CSS Floating, you’ll receive a discount on the entire Definitive Guide once it’s released. Why wait? Learn how to bring life to your web pages now.
- Learn the characteristics of floated elements, and CSS rules for using them
- Be aware of certain rule exceptions when applying floats to your design, including the use of negative margins
- Use the clear property to prevent floats from affecting elements in the next section of the document
- Create floating boxes in non-rectangular shapes, including rounded corners, circles, ellipses, and even polygons
- Define float shapes with transparent or opaque images
商品描述(中文翻譯)
在圖片周圍流動文本當然不是什麼新鮮事,但使用 CSS 你可以讓任何元素浮動,從圖片到段落再到列表。在這本實用指南中,作者 Eric Meyer 揭示了一些有趣且令人驚訝的方式來在你的網頁設計中使用 CSS 浮動,包括最新的功能,能讓內容流過非矩形的浮動形狀。
這本書簡短而精煉,是即將出版的第四版《CSS: The Definitive Guide》的摘錄。當你購買《CSS Floating》的印刷版或電子書版時,將在《Definitive Guide》發布後獲得整本書的折扣。為什麼要等呢?現在就學習如何為你的網頁注入活力。
- 了解浮動元素的特性,以及使用它們的 CSS 規則
- 在將浮動應用於設計時,注意某些規則的例外情況,包括使用負邊距
- 使用 `clear` 屬性來防止浮動影響文檔下一部分的元素
- 創建非矩形形狀的浮動框,包括圓角、圓形、橢圓形,甚至多邊形
- 使用透明或不透明的圖片來定義浮動形狀