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>
Здравствуйте!
Приобретение диплома ПТУ с сокращенной программой обучения в Москве
landik-diploms-srednee.ru/attestat-shkoly
Дэдпул и Росомаха фильм https://bit.ly/deadpool-wolverine-trailer-2024
Дэдпул и Росомаха 2024 https://bit.ly/deadpool-wolverine-trailer-2024
Здравствуйте!
Заказать документ о получении высшего образования вы имеете возможность у нас в Москве.
diplomrushkan.ru
Привет, друзья!
Мы изготавливаем дипломы психологов, юристов, экономистов и других профессий по выгодным ценам.
diplomrushka.ru/kupit-diplom-instituta
you will have an incredible blog right here! would you prefer to make some invite posts on my blog?
Having read this I believed it was really informative. I appreciate you spending some time and energy to put this informative article together. I once again find myself personally spending a lot of time both reading and posting comments. But so what, it was still worthwhile.
Дэдпул и Росомаха кино https://bit.ly/deadpool-wolverine-trailer-2024
Здравствуйте!
Приобрести диплом университета.
diplomyx-man.ru/kupit-diplom-ekaterinburg
Nice post, I wonder when crosby will be back. He has been injured for so long now.
Добрый день!
Узнайте, как безопасно купить диплом о высшем образовании
diploms-rushkas.ru/kupit-diplom-medsestry
oxcarbazepine 300mg generic – order pirfenex for sale synthroid 75mcg generic
Glad to be one of the visitants on this awe inspiring website : D.
Link pyramid, tier 1, tier 2, tier 3
Tier 1 – 500 connections with positioning inside writings on content sites
Secondary – 3000 URL Forwarded hyperlinks
Lower – 20000 hyperlinks assortment, comments, articles
Employing a link network is helpful for search engines.
Need:
One hyperlink to the platform.
Search Terms.
True when 1 query term from the page title.
Remark the additional functionality!
Crucial! First-level links do not intersect with 2nd and Tertiary-level hyperlinks
A link hierarchy is a mechanism for enhancing the flow and link profile of a internet domain or virtual network
Добрый день!
Мы предлагаем дипломы любой профессии.
santa4.su/gallery/image/253-dlya-chego-segodnya-pokupayut-attestaty-i-diplomy-v-seti-internet
Рады оказать помощь!.
Do you mind if I quote a few of your articles as long as I provide credit and sources back to your site? My website is in the very same niche as yours and my users would genuinely benefit from some of the information you present here. Please let me know if this ok with you. Cheers!
Your blog site is pretty cool! How was it made !
Привет!
Полезная информация как купить диплом о высшем образовании без рисков
mandiplomik.ru/kupit-diplom-voronezh
Будем рады вам помочь!.
Здравствуйте!
Приобрести документ университета
landik-diploms-srednee.ru/kupit-diplom-v-ekaterinburge
Now we know who the ssebnile one is here. Great post!
I was just seeking this info for a while. After six hours of continuous Googleing, at last I got it in your website. I wonder what is the lack of Google strategy that don’t rank this type of informative websites in top of the list. Usually the top websites are full of garbage.
In my opinion each of your commercials activated my personal internet browser for you to re-size, you may want to placed that on your own blacklist.
some genuinely prize articles on this website , saved to fav.
Здравствуйте!
Мы изготавливаем дипломы психологов, юристов, экономистов и других профессий по приятным тарифам.
chillibell.com/read-blog/31_kak-najti-nadezhnyj-i-proverennyj-magazin-chto-realizuet-diplomy?mode=night
Learn more Google Instant is off due to connection speed
Привет!
Диплом для вас
komfort.rusff.me/viewtopic.php?id=14087#p41442
If you could mail me with a few suggestions on how you made your blog look this excellent, I would be grateful.
Hi there just wanted to give you a brief heads up and let you know a few of the images aren’t loading correctly. I’m not sure why but I think its a linking issue. I’ve tried it in two different web browsers and both show the same outcome.
i love alternative treatments because it is simple and does not have nasty side effects’
Добрый день!
Возможно ли купить диплом стоматолога, и как это происходит
rushkadiplomik.ru