TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

3D in CSS

370 pointsby bradwoodsioover 2 years ago

27 comments

noduermeover 2 years ago
I built an engine for my personal site (5-6 years back) along similar lines, with the idea being that elements are defined as &quot;papers&quot; of different sizes that are constantly being animated, and reshuffle themselves on window resize to different positions. (Try rotating it if you look on a phone or tablet). They&#x27;re all 3d css (so the browser caches their content as bitmaps and renders them as such) and originally they did various flip effects as they moved, but I ended up ditching all but a slight amount of axis tilt on a few elements as it was hard to read and hard to position accurately in 2D space in relation to each other across a lot of screen sizes...<p><a href="https:&#x2F;&#x2F;thestrikeagency.com" rel="nofollow">https:&#x2F;&#x2F;thestrikeagency.com</a><p>[edit] I almost never show personal work here so I may delete this...
评论 #34320550 未加载
natelokersover 2 years ago
I did a project a while back that takes advantage of this, as a way to show the folding an unfolding of brochures, I found it to work much better for this particular use case than WebGL<p>here is the output <a href="http:&#x2F;&#x2F;gofoldit.com&#x2F;abcdfegh" rel="nofollow">http:&#x2F;&#x2F;gofoldit.com&#x2F;abcdfegh</a><p>and this is the tool where you create them<p><a href="http:&#x2F;&#x2F;gofoldit.com&#x2F;demo" rel="nofollow">http:&#x2F;&#x2F;gofoldit.com&#x2F;demo</a>
评论 #34318692 未加载
评论 #34320595 未加载
评论 #34321116 未加载
评论 #34320208 未加载
TazeTSchnitzelover 2 years ago
Late last year I wrote a tool that can take a 3D model in .obj format and turn it into HTML and CSS that&#x27;ll display the model rotating about its y axis. It&#x27;s ludicrously inefficient and impractical, but it was very fun to do: <a href="https:&#x2F;&#x2F;github.com&#x2F;hikari-no-yume&#x2F;obj-to-html">https:&#x2F;&#x2F;github.com&#x2F;hikari-no-yume&#x2F;obj-to-html</a>
评论 #34319016 未加载
derkoeover 2 years ago
<a href="https:&#x2F;&#x2F;impress.js.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;impress.js.org&#x2F;</a> uses this extensively to create impressive presentations.
评论 #34317314 未加载
评论 #34317275 未加载
评论 #34316802 未加载
评论 #34315976 未加载
评论 #34317392 未加载
neobergover 2 years ago
I did some 3d css demos back in 2013. This one got quite popular so maybe you might&#x27;ve seen it:<p>3D Macbook Air animation: <a href="https:&#x2F;&#x2F;codepen.io&#x2F;neoberg&#x2F;pen&#x2F;DEZbKv" rel="nofollow">https:&#x2F;&#x2F;codepen.io&#x2F;neoberg&#x2F;pen&#x2F;DEZbKv</a><p>This one I think is more impressive but doesn&#x27;t look as beautiful: <a href="https:&#x2F;&#x2F;codepen.io&#x2F;neoberg&#x2F;pen&#x2F;DEwwNE" rel="nofollow">https:&#x2F;&#x2F;codepen.io&#x2F;neoberg&#x2F;pen&#x2F;DEwwNE</a><p>edit: Forgot about this one. <a href="https:&#x2F;&#x2F;codepen.io&#x2F;neoberg&#x2F;pen&#x2F;doVQqv" rel="nofollow">https:&#x2F;&#x2F;codepen.io&#x2F;neoberg&#x2F;pen&#x2F;doVQqv</a>
gketumaover 2 years ago
This website brings me Joy. So elegant.
评论 #34318587 未加载
评论 #34320259 未加载
评论 #34316777 未加载
评论 #34318433 未加载
modelessover 2 years ago
Even if you are using WebGL for 3D, CSS 3D can be useful for adding interactive HTML to your scene. For example, here&#x27;s a WebGL 3D model of a TV with a working YouTube embed for the screen: <a href="https:&#x2F;&#x2F;playcanv.as&#x2F;p&#x2F;nzMF97vU&#x2F;" rel="nofollow">https:&#x2F;&#x2F;playcanv.as&#x2F;p&#x2F;nzMF97vU&#x2F;</a>
somishereover 2 years ago
Loving the format! Tho to note the controls are a little (tiny bit) fiddly on FF.<p>Throwing my hat in ~ some basic &#x2F; not-particularly-optimised 3d CSS hover state icons I made for my CV a few months ago: <a href="https:&#x2F;&#x2F;codepen.io&#x2F;theprojectsomething&#x2F;pen&#x2F;JjLLJNx" rel="nofollow">https:&#x2F;&#x2F;codepen.io&#x2F;theprojectsomething&#x2F;pen&#x2F;JjLLJNx</a> :)
评论 #34320578 未加载
satvikpendemover 2 years ago
This is cool but if you haven&#x27;t already, check out what Three.js can do in the browser: <a href="https:&#x2F;&#x2F;codesandbox.io&#x2F;s&#x2F;lxvqek?file=&#x2F;src&#x2F;App.js" rel="nofollow">https:&#x2F;&#x2F;codesandbox.io&#x2F;s&#x2F;lxvqek?file=&#x2F;src&#x2F;App.js</a><p>This is using a wrapper called react-three-fiber to make the code more declarative rather than imperative.
评论 #34319425 未加载
评论 #34318124 未加载
greenSunglassover 2 years ago
The way this page was built is amazing for learning. &quot;dragging&quot; the properties and visualize &#x2F; see what effect it has instantly is so helpful to understand what&#x27;s up. Wish I&#x27;ve learnt CSS with that kind of page.
评论 #34320476 未加载
ly3xqhl8g9over 2 years ago
Since 2015 I have been thinking how to explore information as a 3D structure. This thought has led to developing <i>plurid</i> [1], [2], a component library (for React for now) to transform a web page into a rotate-able&#x2F;translate-able&#x2F;scale-able space with the content on planes.<p>[1] Code, <a href="https:&#x2F;&#x2F;github.com&#x2F;plurid&#x2F;plurid">https:&#x2F;&#x2F;github.com&#x2F;plurid&#x2F;plurid</a><p>[2] Demo, <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=aV7MWFDVFkk">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=aV7MWFDVFkk</a>
ehsankiaover 2 years ago
I remember doing this back in 2012 using the matrix3d()<p><a href="https:&#x2F;&#x2F;ehsankia.com&#x2F;css3&#x2F;2.html" rel="nofollow">https:&#x2F;&#x2F;ehsankia.com&#x2F;css3&#x2F;2.html</a><p>Honestly surprised it still works
评论 #34322925 未加载
geuisover 2 years ago
I forget the name of the effect, but it&#x27;s the one where the background may have images that move at different rates as the page scroll increases.<p>Over the years I&#x27;ve seen many, many terrible implementations of that effect with JavaScript.<p>The correct and highly performant way to do that is using perspective. It&#x27;s an effect that can be done entirely in css.
评论 #34318165 未加载
评论 #34315777 未加载
评论 #34315770 未加载
pfoofover 2 years ago
This lorem ipsum works so-so on Safari. The text can be selected and it only rotates after selecting and deselecting it
评论 #34316088 未加载
评论 #34315768 未加载
评论 #34317380 未加载
KronisLVover 2 years ago
&gt; Sometimes a thing can be better communicated when shown from multiple perspectives. Below is an wireframe of a web page I used in a presentation. I needed to communicate there are 3 elements in the top-right corner, stacked on top of 1 another. By translating &amp; rotating this wireframe in a 3D-space, I can show it from a 2nd perspective.<p>This is really cool, might even be helpful to have as a feature to have in browser dev tools, looking at the underlying structure of any page and how elements are nested, to figure out where most of the complexity lies.<p>I think Firefox actually used to have that, though it was removed: <a href="https:&#x2F;&#x2F;firefox-source-docs.mozilla.org&#x2F;devtools-user&#x2F;3d_view&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;firefox-source-docs.mozilla.org&#x2F;devtools-user&#x2F;3d_vie...</a>
评论 #34322961 未加载
toughyearover 2 years ago
The website is well crafted. Anyone has a list of more such non-generic sites with content by developers?
评论 #34323209 未加载
rikrootsover 2 years ago
Tracking mouse movement over a CSS 3d rotated canvas element can be fun<p><a href="https:&#x2F;&#x2F;scrawl-v8.rikweb.org.uk&#x2F;demo&#x2F;dom-013.html" rel="nofollow">https:&#x2F;&#x2F;scrawl-v8.rikweb.org.uk&#x2F;demo&#x2F;dom-013.html</a>
评论 #34330779 未加载
TheGoodBarnover 2 years ago
I made a silly landing page for myself using some of the outline techniques. I think it looks fun: <a href="https:&#x2F;&#x2F;www.goodbarn.xyz&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.goodbarn.xyz&#x2F;</a><p>Its just a pure html page, so you can view page source and see how rugged it is.
fuzzy2over 2 years ago
Is there any way to enable anti-aliasing for stuff like that? I think CSS had something for image resampling, maybe something similar exists here? It doesn’t look too great on Firefox (Windows 10) for me. It’s better on Edge, but still not <i>good</i>.
deancover 2 years ago
Brad has a large collection of excellent articles written to educate on topics [1]. Don&#x27;t miss the others, there are some real gems.<p>[1] <a href="https:&#x2F;&#x2F;garden.bradwoods.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;garden.bradwoods.io&#x2F;</a>
评论 #34332392 未加载
lukaeschover 2 years ago
I really enjoyed this website. There are many more interesting topics in addition to the 3D CSS stuff
dylan604over 2 years ago
&quot;Where to Next?&quot;<p>Don&#x27;t worry, things hardly ever fuck up around here. That&#x27;s the same guy, right?
zagrebianover 2 years ago
Does that website have an RSS feed?
评论 #34460049 未加载
评论 #34320204 未加载
WaffleIronMakerover 2 years ago
Is there some broken screen effect on this website? or am I going insane?
kylemhover 2 years ago
fwiw this website is stellar - check out all the other articles if you&#x27;re a front-end dev!
kaapipoover 2 years ago
Sliders don&#x27;t work on mobile
评论 #34322152 未加载
评论 #34321173 未加载
jeromesalimaoover 2 years ago
This is so cool.