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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ha Do That in HTML5

34 点作者 kadhinn超过 14 年前

22 条评论

jdietrich超过 14 年前
Will the flash button gracefully degrade if I have an obsolete version of Flash Player, or I use a flash blocker? Can an African schoolkid see it on their OLPC XO? Can a blind person read it with their screen reader or braille terminal? Can I select it using a keyboard or an accessible input device? Can I restyle it in the browser, so it's clear enough for my grandma to read through her cataracts and big enough for her to click on despite her arthritis?<p>Every time you use Flash, you're insulting the dignity of the elderly, the disabled and any number of others. You're saying to users "if you're not a healthy young person on a modern computer with a fast connection, you're a second-class citizen". We shouldn't tolerate it, and in many countries the law doesn't allow us to.<p>HTML works because it works for everyone, not just a fortunate few. This isn't about technology, it's a civil rights issue. No matter how hard Adobe try, Flash accessibility is massively inferior to HTML accessibility. They should be ashamed that they took so long to even begin to address the needs of disabled users and developers using their products should be ashamed for not using the open, standards-compliant, accessible alternative.
jbail超过 14 年前
You can do that in HTML5. You could use CSS3 with animated gifs/pngs --- or go straight to the canvas. Either way would get it done. I'd vote for using canvas.<p>I'll leave it to someone else to implement. I've got real applications to build today...
hnal943超过 14 年前
So... the point is that HTML5 can't make annoying buttons with poor usability?
评论 #1672110 未加载
psadauskas超过 14 年前
No, I don't believe I will. I'd rather my users know the button is a button, and will behave like they expect, all without taking up 50% of my CPU...<p>(Aside: I went back to the page to double-check CPU usage, and the button wasn't working this time. Yup, behold the awesome power of flash!)
评论 #1672054 未加载
评论 #1672183 未加载
Encosia超过 14 年前
Well, that shouldn't be very hard to reproduce: <a href="http://dl.dropbox.com/u/360937/do-that-in-html5-fail.png" rel="nofollow">http://dl.dropbox.com/u/360937/do-that-in-html5-fail.png</a>
评论 #1672570 未加载
STHayden超过 14 年前
People who complain the button is ugly seem to be missing the point. iF there is something that flash can do that HTML5 and the canvas can't do then it's a bridge to be crossed.<p>While this might be a bad example it would be worth wile to have a list of what flash can do that HTML5 can not yet. The we can talk about if it is or is not worth implementing.
zackola超过 14 年前
That is the ugliest button I've ever seen on the internet.
评论 #1672006 未加载
评论 #1671982 未加载
kqueue超过 14 年前
I don't think the author knows much about html5 or the concept of canvas in general.<p>If he goes to <a href="http://www.chromeexperiments.com/" rel="nofollow">http://www.chromeexperiments.com/</a>, he'll realize that all this is doable.
rimantas超过 14 年前
My rought take (sure, I cheated a bit with a background too):<p><a href="http://kod.as/lab/button/" rel="nofollow">http://kod.as/lab/button/</a><p>Safari and Chrome.
superk超过 14 年前
I think the "gracefully" part is misleading. This could be done with Javascript and a simple CSS class added to the &#60;button&#62; is both graceful and degrades gracefully. But if we're comparing apples-to-apples, what's graceful about the Flash solution - opening one (possible more - Photoshop, etc) programs, learning a proprietary language (Actionscript) and exporting a binary that's not accessible to users or search engines, etc...
jws超过 14 年前
From stackoverflow.com where some misguided fool wants to draw his page background with canvas:<p><i>… Webkit-based browsers do allow you to use a element in the CSS background property. Just give the canvas an id, then use "body { background:url(#mycanvas); }" in your CSS.</i><p>Sure, that isn't in the HTML5 standard per se, but since there is no HTML5 standard we can pretend it is.<p>steveklabnik points out in this thread an example of someone doing it, <a href="http://mobdb.com/reddit/button.html" rel="nofollow">http://mobdb.com/reddit/button.html</a> , but they use absolute positioning to overlay the button and canvas and will surely go mad if they try to use it for real.<p>I suppose, with this newfound CSS knowledge I will now have to change my home page background to a hilbert curve.<p>Edit: Actually, I think I'll use the "background: -webkit-canvas(name)" and getCSSCanvasContext() DOM function documented at <a href="http://webkit.org/blog/176/css-canvas-drawing/" rel="nofollow">http://webkit.org/blog/176/css-canvas-drawing/</a><p>Upshot: No hilbert for me. Takes about 1 second to render a maximally detailed hilbert in my browser on a core i7 processor.
steveklabnik超过 14 年前
Someone on Reddit did it: <a href="http://www.reddit.com/r/programming/comments/db37b/ha_do_that_in_html5/c0yvojd" rel="nofollow">http://www.reddit.com/r/programming/comments/db37b/ha_do_tha...</a>
评论 #1673652 未加载
评论 #1672526 未加载
pedalpete超过 14 年前
Does the author realize that the last image has Mr T. representing flash and Rocky representing HTML5.... in the movie, I believe, Rocky won.
wazoox超过 14 年前
Apparently the effect loops endlessly, always the same. In fact it can be replicated with 1995 tech, i. e. animated GIF.
DavidBishop超过 14 年前
(Why are there so many posts here without a comment section? Now to the topic at hand...)<p>Why?<p>That's my first question. Why? As in why do I need this button? As in why do I have to do this in HTML 5?<p>HTML 5 doesn't have to replace Flash. Flash may be great for some devices, and the computers of today can do Flash.<p>Why does this argument always end up with "But I can do this wildly unnecessary thing in Flash! I should be able to make something unequally unnecessary in HTML 5".<p>Perhaps HTML 5 can't do the unnecessary. Perhaps that's all the more reason to go to HTML 5.<p>Simplicity is the ultimate sophistication. - Leonardo da Vinci
S_A_P超过 14 年前
He should have cleaned his room before taking a picture in it. If the debate was so tiresome between flash/html 5, why add fuel to the fire?<p>I still dont see the need to justify your purchase/platform/technology. build things that your consumers like, use VB script, Cobol, or powerbuilder for all I care- just make it cool.
basicxman超过 14 年前
<i>yawn</i> Whatever happened to use the right tool for the right job?<p>If you need a button like that (gaming website is about the only thing I can think of), chances are your audience probably has Flash.<p>My personal opinion however is Flash is not the right tool for the particular job of creating navigation.
StavrosK超过 14 年前
I can't, sorry, Flash doesn't support my OS so I can't see it.
benologist超过 14 年前
This should be posted as a challenge:<p><a href="http://armorgames.com/play/1716/gemcraft" rel="nofollow">http://armorgames.com/play/1716/gemcraft</a>
seejay超过 14 年前
Am I the only one who feels like this guy is just a troll???
mvalle超过 14 年前
Is this from Adobe, or does someone really care that much?
9ec4c12949a4f3超过 14 年前
ITT: People getting trolled to help him convert a website from flash to html5.