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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

CSS Hexagon Tutorial

90 点作者 jtauber大约 13 年前

10 条评论

gavinlynch大约 13 年前
Tantek Çelik did some of this experimentation, amazingly, over a decade ago (2001). Right-click for his CSS:<p>"A Study of Regular Polygons" <a href="http://tantek.com/CSS/Examples/polygons.html" rel="nofollow">http://tantek.com/CSS/Examples/polygons.html</a>
评论 #3798068 未加载
评论 #3797456 未加载
jawns大约 13 年前
And then, of course, there's this:<p><a href="http://www.fileformat.info/info/unicode/char/2b22/index.htm" rel="nofollow">http://www.fileformat.info/info/unicode/char/2b22/index.htm</a>
评论 #3798199 未加载
评论 #3798054 未加载
评论 #3798784 未加载
评论 #3797450 未加载
评论 #3797685 未加载
评论 #3798014 未加载
cheald大约 13 年前
If you're willing to sacrifice IE7 support, you can accomplish that all with one element per haxagon, as well, by utilizing the :before and :after pseudo-elements.
评论 #3797431 未加载
duopixel大约 13 年前
The kind of hacks achievable with css borders is amazing. Here is a jQuery plugin that does a 3d flip using borders:<p><a href="http://lab.smashup.it/flip/" rel="nofollow">http://lab.smashup.it/flip/</a><p>And here someone produced a clever 3d animation using borders:<p><a href="http://www.uselesspickles.com/triangles/" rel="nofollow">http://www.uselesspickles.com/triangles/</a>
spystath大约 13 年前
These tricks with CSS are all nice. Pardon my ignorance, though, if one needs a way to draw shapes wouldn't something like SVG be more suitable for these sort of tasks? I know it is probably not as easy as with CSS (support is more limited as well), but isn't this example kinda like abusing the limits of the stylesheets?
评论 #3797894 未加载
creamyhorror大约 13 年前
And there's this:<p><a href="http://css-tricks.com/examples/ShapesOfCSS/" rel="nofollow">http://css-tricks.com/examples/ShapesOfCSS/</a><p>Includes the infinity symbol, an egg, Pac-man, and the ever fun Yin-Yang symbol.
smickie大约 13 年前
Funny this came up, I was just looking at how Twitter's bootstrap creates the "caret" drop-down arrow.<p><a href="http://twitter.github.com/bootstrap/components.html#buttonDropdowns" rel="nofollow">http://twitter.github.com/bootstrap/components.html#buttonDr...</a><p>If you inspect the down arrow it's created in the same way. Interesting.<p>I guess it's better than an extra image request if you don't mind the style.
glenntzke大约 13 年前
The power of the hexagon in css! I've seen some interesting art built out of triangles and render very well in all browsers and together with hexagons you can build complex geo art. Here's a favorite of mine: <a href="http://www.ragestorm.net/erezsh/parrot.html" rel="nofollow">http://www.ragestorm.net/erezsh/parrot.html</a>
dinedal大约 13 年前
Is it possible to bind an image to these instead of a straight color?
waferlove大约 13 年前
Clever. I'm going to play around with this now.