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>
Приобретение диплома ПТУ с сокращенной программой обучения в Москве
Вопросы и ответы: можно ли быстро купить диплом старого образца?
Party Scene 하이오피 (https://m1bar.com/user/EddieOlszewski/)
Полезные советы по безопасной покупке диплома о высшем образовании
Быстрое обучение и получение диплома магистра – возможно ли это?
купить диплом курск arusak-diploms.ru .
Как официально приобрести аттестат 11 класса с минимальными затратами времени
jenskii.store/?post_type=topic&p=18656
In the identical interview, Jackson acknowledged the team was nonetheless hoping to schedule extra games in 2021, noting that the workforce’s newfound notoriety would ensure that the primary opponent who agreed to play Bishop Sycamore would make “nationwide news” by doing so.
During a heat health alert, you need to use your air conditioner at any time.
There are completely different loons that don’t like me.
The design of the Sant-Denis window, created by the radiating stone mullions, later gave the brand new type its identify, “Rayonnant”.
Nelson is a small region, so it has a pretty uniform climate, and its agriculture would not vary a lot.
Commerce exhibits give you the opportunity to not solely present your product or describe your service, but also create that each one important first impression.
Eberhard, Robert (September 2011).
However, Beerschot announced their intention to enchantment against their choice, based on the quantity of wonderful they received as well as their monetary problems.
Howson was born on 9 May 1885 in Flintshire to Ethel and George John Howson.
Take the Odakyu line from Shinjuku — but ensure that to take the categorical (pink) or rapid specific (orange) unless you wish to waste the entire day sitting on trains!
31 August 1978: Liverpool, West Bromwich Albion and Everton are level on points at the highest of the League at the top of August with three wins from three matches.
By and huge, electromechanical units completely displaced the older model mechanical typewriters.
United States Copyright Office.
Conserving proportion in mind, group a farmhouse desk with new metal chairs.
EARLY Chicken admission at 9 AM.
Then the physique shop manufactured the 65 carbon-fiber panels for every automotive.
Following this, Kawashima said that he was determined to assist the membership win the league.
Using antiquated gear, they took heavy casualties (16,000) towards modern armour of the German enemy.
In western France, the change in model got here later, not starting until 1245-1250.
Ragnarök is a collection of occasions in Norse mythology resulting in the fiery destruction and fertile rebirth of the world.
He was a part of the Swiss team on the 2012 Olympics, and also represented the senior facet at the FIFA World Cup in 2014, 2018 and 2022, and the UEFA European Championship in 2016, 2020 and 2024.
Maybe some sequins and detailing, however not so in the wedding world.
After the battle, she received the retrieved fragments but it could be several years earlier than she resumed work on the project, which she completed in 1952; the outcomes had been installed in the southeast windows of the church.