html5

How can I create a color striped background, animated to slowly turn 360 degrees, using no raster images or js?

I got the idea to create a purely code-driven striped image background when I saw Katy Perry's website: http://www.katyperry.com/ Then I saw the animation of the rotating earth on FoWD's 404 page: http://futureofwebdesign.com/404 I believe this same concept should be possible using html5, css3 and canvas. Here's what I'm thinking: Have...

HTML5-Compatible User-Agent Strings?

I'm interested in writing a log file analyzer that can determine the percentage of users who have HTML5-Canvas support based on the user agent strings in the logs. However, having scoured some of the literature out there on the subject, it's not obvious to me what I should be looking for in the user-agent string. One simple option would...

How do I make a canvas drawing to completely fill the browser?

Here's the code I currently have. <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <script src="http://code.jquery.com/jquery-1.4.2.min.js"&gt;&lt;/script&gt; <script> function draw() { var diagCanvas = document.getElementById("diag-cnvs"); diagCanvas.height=window.innerHeight; di...

which html tags can use class attribute example: <i class="myclass">text inside</i>?

Hi, Which HTML tags can use the class attribute? (In which standards — e.g. HTML/XHTML/HTML5 etc. — and in which browsers.) For example, is the following legal or not? <i class="myclass">text inside</i> Thanks. ...

The case for offline web applications

With many browsers adding proper local storage support (and with this whole HTML5 buzz), there is a lot of talk about offline web apps competing with desktop software. But, as a matter of fact - one quick "clear private data" on your browser (which a lot of people do) - clears all the local storage data. I'm now thinking that local sto...

Cache-manifest a login-protected page

How can I have a user authenticate and then download an offline application created specifically for them? I'm creating a public/private key encryption system for offline use and each user needs to be able to login and "download" their encryption/decryption page (app.php) using a form. This form dumps them on their app.php page, served ...

Updating image data using putImageData on a resized canvas element

I have a static image (a png) that I'm drawing on a canvas element using drawImage. var _canvas = null; var _context = null; var _curImageData; function copyImageToCanvas(aImg) { _canvas = document.getElementById("canvas"); var w = aImg.naturalWidth; var h = aImg.naturalHeight; _canvas.width = w; _canvas.height = h; _conte...

Convert pdf, doc, ppt to html5

I've googled (without any luck) for open source software that can convert doc, ppt, and pdf to HTML5. (Exactly what Scribd does) Are there open source equivalents to the type of conversion Scribd does? If anyone knows of a paid service, that would also work. Scribd has an API, but that's for use with the flash viewer. Also, I would like...

Multiple Canvas Zooms behaving erratically

I'm running into a problem with the HTML5 Canvas tag and adjusting the scale several times. After zooming twice, the canvas only uses a fraction of the available canvas height & width, even though I'm adjusting for the zoom level. <html> <head> <script> var ctx; var nScale = 1.00; function pageLoad() { ctx=document.getElementById(...

html5 fileapi binary data

Can you get the binary data from a file without the fileReader class? I'm trying to upload files and I have it working in firefox & chrome/webkit but safari 5 doesn't have filereader. There has to be a way to get the binary data as gmail has drag and drop that works in safari 5. ...

How to set status with HTML5 Web Database api

I'm using the HTML5 Web Database API and I have a function that checks to see if the app needs to go and perform it's setup phase : this.setupRequired = function() { var status; try { this.db.transaction(function(tx) { tx.executeSql("SELECT * FROM settings", [], function (tx,result) { if (resu...

How will http server handle html5 web sockets?

I am reading a lot about HTML5 and I like the web sockets in particular because they facilitate bi-directional communication between web server and web browser. But we keep reading about chrome, opera, firefox, safari getting ready for html5. Which web server is ready to use web sockets feature? I mean, are web servers capable of initia...

HTML 5 canvas random opacity issue

Could someone explain to me why this is fail. Trying to get the opacity to load as a random value. I cannot get this to render in anything but black even though the alert is clearly showing that I'm getting values between 0.00 and 1.00 Important Code: alert(Math.round(Math.random() * 100) / 100); <-- Tests to see if output is what i...

iPad Play HTML5 Audio from dynamic source (servlet/jsp)

I'm trying to use the HTML5 tag on the iPad. It works fine if the source is set to a hard-coded file: <audio src="http://...../myFile.wav"&gt;&lt;/audio&gt; ...but if I set the URL to a servlet or ASP.net page it refuses to play it! <audio src="http://...../myDynamicHandler.ashx?audioId=123"&gt;&lt;/audio&gt; Any ideas? ...

How to mimic Powerpoint presentation feel using HTML/CSS and javascript

Hello, I was looking at an HTML5 presentation and was wondering if anybody knew how the actual presentation was created. You can zoom in and out and view all the slides. You can also navigate with your keyboard. Here's the site with the slideshow: http://slides.html5rocks.com/#slide5 ...

Error in crossfading images using <canvas>

I'm trying to crossfade images using the canvas drawImage() method. I'm using jQuery to fadeIn() and fadeOut() the canvas. Here's the code: $("#c").fadeOut(800,function() { //aw and ah are calculated here ctx = canvas.getContext('2d'); ctx.drawImage(img1, 0, 0, aw, ah); $("#c").fa...

Flash Obsolete, What about html5 or css3 is really that powerful?

i dont claim in any shape or form claim to be a Flash Activist, but apart from its obvious annoyances and discrepancies, any fool can see its couple of uses, that are in a big way reasonably important to the right consumer and website. There has been a lot of talk that HTML5 and CSS3 is the future of the web, so much so that ie9 is actu...

Race-condition with web workers when setting onmessage handler?

Please consider the following code and the explanation from this Mozilla tutorial "Using web workers": var myWorker = new Worker('my_worker.js'); myWorker.onmessage = function(event) { print("Called back by the worker!\n"); }; Line 1 in this example creates and starts running the worker thread. Line 2 sets the onmessage hand...

Converting video to HTML5 ogg / ogv and mpg4

Hi Does anyone know about any software that can convert video (avi, flv, whatever) to HTML5 supported ogg/ogv and mpeg4 formats? I tried a few but I couldn't find anything that actually works. ...

Using hyphen in link_to property?

In my Rails app, I need to set a value for a custom data-* attribute on an anchor tag. However, hashes can't have hyphens if I'm not mistaken. I essentially want to do this: <%= link_to 'Example', example_path, :class => 'something', :data-id => '15' %> :data-id is not valid, however. What can I do to work around this? ...