Share via


類型屬性 (圖形) (VML)

本主題描述 VML,這是在 Windows Internet Explorer 9 中已被取代的功能。 依賴 VML 的網頁和應用程式應該移轉至 SVG 或其他廣泛支援的標準。

注意

自 2011 年 12 月起,本主題已封存。 因此,它不再主動維護。 如需詳細資訊,請參閱 封存內容。 如需有關目前 Windows Internet Explorer 版本的資訊、建議和指引,請參閱 Internet Explorer 開發人員中心

 

定義 ShapeType 專案的識別碼參考。 讀取/寫入 字串

適用於

圖形

標籤語法

<v:
          element 
          type=" expression ">

指令碼語法

element 
          .type="#expression"
expression=element .type

備註

如果 Type 屬性參考 ShapeType 元素的識別碼, ShapeType 的填滿、路徑和筆劃會用來建立圖形的範本。 衍生自 ShapeType 的值可由個別圖形值覆寫。

如果在標記中使用,字串值必須以數位記號 (#) 符號開頭。

VML 標準屬性

範例

ShapeType 圖形是以 「 mytype 」 作為識別碼來建立。

   <v:shapetype id="mytype"
   fillcolor="red" strokecolor="blue"
   coordorigin="0 0" coordsize="200 200">
   <v:path v="m 0,0 l 0,200, 200,200, 200,0 x e"/>
   </v:shapetype>

然後,如果您使用 ShapeType 值建立圖形,圖形將具有 「mytype」 ShapeType的屬性;也就是說,「shape01」 會以藍色筆劃填滿紅色。

   <v:shape id="shape01" type="#mytype"
   style="position:relative;top:1;left:1;width:20;height:20">
   </v:shape>

例如,您可以將色彩變更為綠色,以覆寫繼承的值。

   <v:shape id="shape02" type="#mytype"
   fillcolor="green"
   style="position:relative;top:1;left:1;width:20;height:20">
   </v:shape>

類型屬性範例。 (需要 Microsoft Internet Explorer 5 或更新版本.)