HTML5 Canvas標籤範例
隨著時代的進步,HTML的版本一直在進化,目前比較新的版本應該就是HTML5了,這次的HTML5針對許多標籤進行調整,當然也新增了一些標籤,主要的目的是希望可以將一些本來需要利用Flash才可以完成的互動頁面取而用HTML5來進行設計,這樣比較能減輕網頁的負載,但不管怎麼進步,其最重要的目的當然還是要網友能夠看到才行!
目前各家的瀏覽器對於HTML5的支援都不一,如果想要測試看看自己所使用的瀏覽器對HTML5的支援程度,可以到這個網址測試,馬老師針對目前的三款瀏覽器(IE9、Firefox6、Chrome13)來做了測試,IE9於HTML5中測試得到了以下的分數:
Firefox6於HTML5中測試得到了以下的分數:
Chrome13於HTML5中測試得到了以下的分數:
所以用以上的結果來看,目前是Google Chrome對於HTML5的支援最好,不過也只是拿了450分中的340而已,所以是否要全面改用HTML5來開發,還是應該要好好的斟酌一下,但是先了解HTML5能做到的功能,一定是沒問題的!以下就是馬老師針對HTML新增的畫布標籤製作的範例,不過因為瀏覽器支援的關係,必須使用Chrome觀賞才會是比較完整的功能喔!
範例影片:
PS:本範例的網頁所使用的圖檔為寬:800、高:600的圖檔,並將圖檔至於img的資料夾中
網頁程式碼:
<!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title>Slide Show</title> <script> var context; var x = 0; var ind; var offset; var photos = new Array(); for(var i=1;i<=13;i++){ var im = new Image(); im.src = "img/p" + i + ".jpg"; photos.push(im); } function slideshow(){ context = document.getElementById('canvas').getContext('2d'); setInterval(loop,10); } function loop(){ x += (slider.value - x) * 0.1; ind = Math.floor(x/800); offset = x % 800; context.drawImage(photos[ind], offset, 0, 800-offset, 600, 0, 0, 800-offset, 600); context.drawImage(photos[ind+1], 0, 0, 800, 600, 800-offset, 0, 800, 600); } </script> </head> <body onLoad="slideshow()"> <canvas width="800" height="600" id="canvas"></canvas><br /> <input type="range" id="slider" style="width:800px;" min="0" max="9600" step="1" value="0"> </body> </html>
college essays help
automatic essay writer
essay services
1- Cinsel sapıklık diğer adıyla parafili nedir?
Hastalık mı, suç mu? Parafili, cinsel uyarılma ve orgazm için, alışılmadık nesneler, eylemler.
essay on community service
help with my essay
best essay
Thanks for some other great post. Where else may anybody get that kind of information in such an ideal method of writing? I’ve a presentation next week, and I am at the look for such information.
essay revision help online
good essay writing services
do my essay for cheap
top 10 essay writers
can i hire someone to write my essay
english essay writing service
custom essay help
essay helper
help to write an essay
reliable essay writing service
service learning reflection essay
essay writer helper
Great blog here! Also your site loads up very fast! What web host are you using? Can I get your affiliate link to your host? I wish my website loaded up as fast as yours lol
best essay writers review
professional college application essay writers
help with essay introduction
A thoughtful insight and ideas I will use on my blog. You’ve obviously spent some time on this. Congratulations
Beneficial Blog! I had been simply just debating that there are plenty of screwy results at this issue you now purely replaced my personal belief. Thank you an excellent write-up.
custom essay online
buy essay online safe
academic essay services
I am glad to be one of the visitors on this great site (:, appreciate it for putting up.
hot dating match
relationship website
ourtime free trial
aduilt dating
single dating
adult dating site
Hello. Great job. I did not expect this on a Wednesday. This is a great story. Thanks!
Hello, I think your blog might be having browser compatibility issues. When I look at your website in Chrome, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other than that, awesome blog!
While this issue can vexed most people, my thought is that there has to be a middle or common ground that we all can find. I do value that you’ve added pertinent and sound commentary here though. Thank you!
which online dating site is best?
free dating sites no fees
dating best sites
yahoo dating personals
single free dating sites without registering
dating sites free chatting
The bacteria were sensitive to vancomycin, linezolid, rifampicin, trimethoprim, sulfamethoxazole, and erythromycin. i took expired doxycycline
If administered intramuscularly, the total daily dose is divided into two doses given 12 hours apart with procaine added. doxycycline rash The king 5 millegrams cbd gummies looked at the news delivered by the envoy, cbd gummies 180 mg and sighed There is a legend who intervened.
Medication- related osteonecrosis of the jaws MRONJ etiological update. how does doxycycline work Relapse after treatment occurs within two weeks of treatment for cystitis.
Greetings… your blog is very interesting and beautifully written.
very good post, i certainly love this web site, keep on it
World Allergy Organ J 6, 1 23 2013. doxycycline heartworm
Assume you are doing good linking to position you on the first pages of search engines.
I think that may be an interesting element, it made me assume a bit. Thanks for sparking my considering cap. On occasion I get so much in a rut that I simply really feel like a record.
side effects of doxycycline monohydrate If a patient does not have AGA but he or she is in the very very earliest stages of AGA, a shed could occur when stopping minoxidil and the result be hair loss.