TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Fancy Buttons - Customize Buttons Effortlessly with CSS3 & Compass [video]

88 点作者 chriseppstein超过 15 年前

10 条评论

tptacek超过 15 年前
We do something similar, but vastly more evil, with Compass on our product. We need the visual experience to be solid on IE (our customer base is enterprise). So... we generate and cache PNG's with ImageMagick using hooks we wrote into Sass. For instance, we can specify arbitrary gradients using Sass color variables and direction/distance arguments, auto-gen rounded corners, and in some cases render text using non-browser-safe type.<p>I wouldn't recommend the approach (I think it's going to be incredibly clunky in a year or so, and that things like Fancy Buttons that use Compass to hide the complexity of optimal degrading CSS are the way to go), but it is an example of how flexible Compass and Sass are: you can abuse them terribly, and they'll stay loyal.
评论 #953339 未加载
chriseppstein超过 15 年前
This plugin is such a great example of how to use compass and sass to build simple abstractions out of some of the most complex css that exists.
评论 #953206 未加载
treyp超过 15 年前
It should be noted that CSS gradients are not yet supported in Firefox (3.5). As such, this demo uses transparent PNGs instead of of CSS3 properties. It works fine in this case, but of course images aren't as flexible as CSS properties would be.<p>However, Firefox 3.6, which should be released within a few weeks, will support custom gradients, so things are looking up.
newsio超过 15 年前
Excellent little demo.<p>Shows how long I've been out of touch with CSS. Didn't know stuff like variables or rounded edges was supported.
评论 #953426 未加载
评论 #953445 未加载
评论 #953416 未加载
audionerd超过 15 年前
What does it look like in IE6? Just curious, if anyone has a screenshot.
评论 #953353 未加载
bprater超过 15 年前
Are there any pure JS implementations of something like Sass/Compass?
评论 #953338 未加载
fnid超过 15 年前
which browsers support this?
评论 #953196 未加载
ltackett超过 15 年前
pimpy.
kyro超过 15 年前
<i>handles</i>
评论 #954771 未加载
lessallan超过 15 年前
Compass FTW!