Re:Cloning the UI of iOS 7 with HTML, CSS and JavaScript
by alexfringes on Friday September 06, 2013 @09:32AM
(#6340309)
Nice attention to detail in this. By the way, it seems like the new view's shadow in the original actually loses opacity as that view leaves the screen.
Did you look around for the blur effect at all? You mentioned it but any luck beyond that? I've seen some attempts but nothing useful.
[ Parent
| on HN ]
Re:Cloning the UI of iOS 7 with HTML, CSS and JavaScript
by madeofpalk on Friday September 06, 2013 @10:31AM
(#6340598)
Yeah, the iOS 7 'frosted glass translucency is impossible to achieve with CSS. Everyone points to filter: blur(), but that only blurs the element, and not items behind it.
The only thing I could come up with was using something like HTML2Canvas[1] to render a portion of the DOM in a canvas/image, position that exactly on top, and then blur that. But all that seems quite convoluted and heavy, so decided not to invest any energy into it.
Re:Cloning the UI of iOS 7 with HTML, CSS and JavaScript
by meerita on Friday September 06, 2013 @10:56AM
(#6340741)
You can blur everything, you just need to point the elements.
Re:Cloning the UI of iOS 7 with HTML, CSS and JavaScript
by M4v3R on Friday September 06, 2013 @09:40AM
(#6340348)
I've looked into this as well. At the moment it is impossible to achieve this effect in plain HTML/Javascript/CSS. It would probably need some Canvas/WebGL magic to work for live content below the navigation bar, but that feels like overdoing it. Achieving blur in CSS is possible, but it's different - you apply blur to an element itself, not to a background of element that covers it.
Re:Cloning the UI of iOS 7 with HTML, CSS and JavaScript
by yesimahuman on Friday September 06, 2013 @10:04AM
(#6340453)
This demo comes close (only works on the phone, and make sure to swipe up to see the menu): http://dl.dropboxusercontent.com/u/2220075/ios7/lax.html
I forget where this comes from, I just have the link.
Re:Cloning the UI of iOS 7 with HTML, CSS and JavaScript
by c2prods on Friday September 06, 2013 @10:11AM
(#6340491)
Yes, I've seen it an a few others demos.
But the difficulty here is to make the content blurred while it scrolls. It's extremely smooth on iOS 7 beta and I can't see anyway to reproduce properly in HTML without severely compromising the performances.
Re:Cloning the UI of iOS 7 with HTML, CSS and JavaScript
by peterhunt on Friday September 06, 2013 @11:50AM
(#6341018)
I think this is actually possible if you use synthetic scrolling (i.e. interpret touch events, compute intertia and use translate3d + requestAnimationFrame). You'd basically have 2 copies of the content area, one blurred w/ css and one not blurred. Render the blurred one above the non blurred one and scroll them in lock step.
You can probably get ok performance if you don't have a lot of images.
A high quality implementation of synthetic scrolling is available at http://github.com/zynga/scroller if you want to play with it.
Re:Cloning the UI of iOS 7 with HTML, CSS and JavaScript
by c2prods on Friday September 06, 2013 @11:57AM
(#6341062)
Hmm, I've tried something like that (although not as elaborate), but it really was sluggish...
It may work but I think you should at least need an iPhone 4S or 5.
Re:Cloning the UI of iOS 7 with HTML, CSS and JavaScript
by M4v3R on Friday September 06, 2013 @10:42AM
(#6340660)
As I said, it's hard/close to impossible to reliably achieve this effect for live content. With static content you can use CSS filters to do the blurring.
Re:Cloning the UI of iOS 7 with HTML, CSS and JavaScript
by dm2 on Friday September 06, 2013 @10:49AM
(#6340702)
Would one of these solutions work?
http://stackoverflow.com/questions/17034485/ios-7s-blurred-o...
Also: http://www.blurjs.com/