俄羅斯方塊用到CANVAs我覺得很有趣增加我的知識
canvas元素是HTML5的一部分,允許手稿語言(scripting languages)動態彩現點陣圖像。它最初由蘋果內部使用自己Mac OS X WebKit推出,供儀表盤的構件和Safari瀏覽器等應用程式使用。後來,它被Gecko核心的瀏覽器(尤其是Mozilla Firefox),Opera和Chrome實作,並被網頁超文字應用技術工作小組提議為下一代的網路技術的標準元素。在介紹Canvas給不同的Web標準社群時,他們有不同的反應。有些人抱怨蘋果公司建設了一個新的專有標準而不是支援未被網路開發商廣泛接受的SVG標準。 svgSVG由1998年成立的W3C SVG工作群組啟動開發,隨著當年提交給W3C的六份標準提案而開展。 SVG允許3種圖形物件類型:向量圖形、點陣圖像以及文字。圖形物件——包括PNG、JPEG這些點陣圖像——能夠被編組、設計、轉換及整合進先前的彩現物件中。文字可以在任何適用於應用程式的XML命名空間之內,從而提高SVG圖形的搜尋能力和無障礙性。SVG提供的功能集涵蓋了巢狀轉換、裁剪路徑、Alpha通道、濾鏡效果、模板對象以及可延伸性。SVG嚴格遵從XML語法,並用文字格式的描述性語言來描述圖像內容,因此是一種和圖像解析度無關的向量圖形格式。
vs code與w3schools截圖 w3schools內建函數列表 Function Description abs() Returns the absolute value of a number all() Returns True if all items in an iterable object are true any() Returns True if any item in an iterable object is true ascii() Returns a readable version of an object. Replaces none-ascii characters with escape character bin() Returns the binary version of a number bool() Returns the boolean value of the specified object bytearray() Returns an array of bytes bytes() Returns a bytes object callable() Returns True if the specified object is callable, otherwise False chr() Returns a character from the specified Unicode code. classmethod() Converts a method into a class method compile() Returns the specified source as an object, ready to be executed complex() Returns a complex number delattr() Deletes the specified attribute (property or method) from the specified object dict() Returns a dictionary (Array) dir() Returns a list of the specified object's properties and methods divmo...
截圖 程式碼 from tkinter import * #下載程式碼,從tkinter輸入所有函式 import time x = ['\U0001F600','\U0001F605','\U0001F606','\U0001F607','\U0001F608']#定義一個串列 y = [] #追蹤特定視窗用途,尚未使用 for i in range(5): window = Tk() #建構視窗,名為window建構一個房子 window.title('陳麗慧python第%d視窗' % (i+1)) window.geometry('400x400+%d+%d') b1=Label(window,text=x[i],font='Arial 250 bold').pack() time.sleep(1) window.update() y.append(window)#追蹤特定視窗用途,尚未使用 window.mainloop()
留言
張貼留言