當你對 CSS 的掌握達到一定程度,它就能替你做很多進階的事,有些原本得靠 JavaScript 才能解決的問題,如今純 CSS 也能勝任。要知道,在 Web 開發中每少一段 JS,對執行效能都是實實在在的減壓。以下 25 個進階教學,能幫你把 CSS 的能力再往前推一層。

CSS Gradients using pure CSS/Background gradients and CSS

CSS Gradient Text Effect/Pure CSS Text Gradient

Understanding Z-Index/CSS Z-index

Create a Scalable Star using CSS border/Border Slants

Dashboard

3D Rollover Button using CSS/How to make sexy buttons with CSS/CSS rollover buttons

Text Embossing/CSS Text Drop Shadows
text-shadow: 0px 1px 0px #e5e5ee;

Add icon to the hyperlink/Iconize Textlinks with CSS

Curly Quotes with Pure CSS/Swooshy Curly Quotes Without Images

A CSS only fly-out menu with transparency/CSS Menu using opacity/Opacity Background Blending Effects/Transparency Menu Watermark on an image

How to create a blurry background using CSS

Examples of and How to Create the CSS Parallax Effect/A parallax illusion with CSS: The Horse in Motion

Lightbox technique

Create Accordion using CSS

Grunge effect tutorial

Learn how to create a block hover effect for a list of links/CSS element hover effect

Dither effect using CSS

Horizontal Menus That Grow on You

CSS swap hover effect

Polaroid-izing photos with CSS and one Image

Create a Magazine Type layout Using CSS

Cool CSS Menu

Create a Tabbed content

A trick that reveals a magic

Show a message when hovering over the links

Add a "loading" icon to your larger images
這 25 個案例涵蓋漸層、陰影、選單、排版與互動效果,幾乎每一項都能直接搬進專案。建議挑幾個動手實作,比單純閱讀有效得多。