FRC: Flash-based Rounded Corner
2006.07.2812:18
Rounded Corner,圆角边框,是一个让 web designer 头疼的老问题了,很多人在研究它的实现,为了圆角效果好、html 代码整洁,大家真是想破了头。说起来 CSS3 开始引入的多背景支持用来做圆角边框最合适了,可惜几乎没有浏览器支持,所以只好歪门邪道折腾自己了。我最近也折腾了一下做了一个基于 Flash 的,原理很粗糙,就是用 JavaScript 修改 DOM 节点,插入额外标签,嵌入 Flash。为啥用 Flash?因为 Flash 支持透明,支持混合模式,可以动态加载图象,有 BitmapData 可以对位图做各种处理……反正好处很多,具体可以看看下面我做的 demo。其实用 Flash 还有一个原因就是用图片或者用 js 都被人研究透了,实在没啥好研究的了…… :D
Demo 在这里,目前只能拿来看看,离实际使用还有距离,等我慢慢改哈。bug 是很多的,没准会把你浏览器搞挂,当心当心。
发现 bug 或者有什么意见请留言。



十分不错,尤其是blending mode。亏你想得出……在一些需要自定义皮肤的服务类blog/门户等十分有市场……
Comment by Realazy — 2006.7.28 @ 15:11
一开始觉得你异想天开,但看了效果之后觉得真是有创意啊,呵呵。
Comment by ghost — 2006.7.28 @ 21:03
离实际应用还远,opera 本地测是可以显示的,只是有点慢,upload 之后居然都不显示了……慢慢改……
Comment by old9 — 2006.7.29 @ 05:00
Seems to work fine on a Mac (OSX 10.3.9, Safari 1.3.2)
Comment by Peter — 2006.7.29 @ 17:27
Thanks Peter :D
Comment by old9 — 2006.7.30 @ 05:06
Looks great! But hasn’t been updated in a while. I’d really like to use it but would need to make some changes + add a bit of stability. Would also like to integrate it with the Mootools library. Any chance you could release the .fla source code? thanks :D
Comment by Jed — 2007.5.27 @ 15:36
@jed
Thanks for dropping in. I have to clear the code first before it could be released. I’ll add a link for the .fla next time I update this little thing. :)
Comment by old9 — 2007.5.27 @ 18:09
Hi, just passing through searching for stuff and stumbled upon your site.
This is amazing! I love the static-background/transparent-PNG stuff myself and you’re creating one awesome tool here.
Keep it up! :)
-D-
Comment by Darrell — 2007.8.31 @ 06:47