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.

Learn How to make a Single Element iPhone in CSS3

144 pointsby binarydreamsover 12 years ago

16 comments

redslazerover 12 years ago
I have never learnt more things in css in such a short time. Seeing someone else go through and seeing them write CSS with live results gave me more insight that the constant rehash of "things you can do with CSS3" . Pausing it playing around with it and the continue the tutorial was amazing.<p>The practical application seems pretty low but as a way of teaching CSS it was great. If someone knows more tutorials like that please tell me about them.
评论 #4492566 未加载
评论 #4492399 未加载
评论 #4492445 未加载
评论 #4492908 未加载
emn13over 12 years ago
Not CSS3... anymore :-)<p>Unless I'm seriously mistaken; the webcast is using the (fairly old) linear gradient syntax which was <i>removed</i> in FF16.<p>Or am I missing something?<p>Spec:<p><a href="http://dev.w3.org/csswg/css3-images/#linear-gradient-type" rel="nofollow">http://dev.w3.org/csswg/css3-images/#linear-gradient-type</a><p>In essence, you can't say linear-gradient(top, ....) but need to say linear-gradient(to bottom, ...).
评论 #4497965 未加载
ceolover 12 years ago
Awesome tutorial! A nitpick: Your use of "it's" is incorrect. When used to convey possession, you omit the apostrophe.<p>Also, this is my first time seeing cssdeck, and I must tell you how fantastic it is! The experience was great.
评论 #4492491 未加载
DenisMover 12 years ago
Is there a vector-graphics language that similar to CSS in capabilities and expressive power, but with a more approachable syntax?<p>I think it's very cool when an image is created in essence programmatically, this really speaks to me as a developer, and I certainly appreciate the declarative nature of CSS, but I wish for something that is easier to read, and so easier to maintain over time, including source control with branches/merges etc. An added bonus to such language would be ability to compile it down to CSS, or Objective-C/UIKit, or C#/Windows, or simply render it to static bitmaps...<p>As someone who doesn't know CSS, I see it similar to the way I see PERL - you can do cool things, but I wouldn't know where to start if I had to change anything, except by trying all things at random.
评论 #4493646 未加载
gondoover 12 years ago
about the 'impossible square' on the button, you can use content:'◻'; // <a href="http://www.fileformat.info/info/unicode/char/25fb/index.htm" rel="nofollow">http://www.fileformat.info/info/unicode/char/25fb/index.htm</a> and then just position it into middle, you ll know the rest
评论 #4492535 未加载
评论 #4492556 未加载
lachygover 12 years ago
This is ridiculous. I'm trying to think of a practical / smart use of this. Incredibly clever, and remarkable show of skill, I'm just questioning it.
评论 #4492419 未加载
评论 #4492997 未加载
评论 #4492679 未加载
joshcrowderover 12 years ago
This is a great tutorial. CSSDesck is fantastic I love how simple the idea is, no fluff just code.
skyhook_mockupsover 12 years ago
This really is excellent... shows an amazing level of creativity and skill.<p>Just bear in mind that these effects will incur a huge performance hit compared to bitmaps.
Timotheeover 12 years ago
Very interesting.<p>Tiny nitpick: this is more an iPhone 4 than a 4S: the black notch on the top frame is not present with the 4S. (they have one notch at the top of each side) Though to be perfectly accurate, you'll also need two notches at the bottom (one on each side) of the frame as well. ;-)
trhtrshover 12 years ago
"In this codecast, you'll learn to create a cool single element iPhone 4S using just CSS3. Click on play now :D"<p>It took me a solid minute to find the "play" button. It was hidden on the other send of the page in the bottom corner in faint color.
madmikeyover 12 years ago
Stupendous!!! you will be my inspiration to get started with CSS3..:) Thanks a lot!!
sp332over 12 years ago
It's not a tutorial, but you can see the code for a single-element MacBook Pro here <a href="http://news.ycombinator.com/item?id=4384954" rel="nofollow">http://news.ycombinator.com/item?id=4384954</a>
monsterixover 12 years ago
Splendid! I am thinking if there is a way to get wood-grain effect similarly?
评论 #4493004 未加载
harelover 12 years ago
Very brave considering Apple is very trigger happy with the lawsuit gun whenever they see anyone using rounded corners not to mention a full on iPhone image... :)
chinchangover 12 years ago
simply superb!
rorrrover 12 years ago
Sort of cool, but absolutely useless.
评论 #4492719 未加载
评论 #4492934 未加载