svg動畫筆記

移動 <animateMotion dur="0.5s" begin="animateMotion7455.end + 3s" fill="freeze" additive="sum" id="animateMotion7456"> <mpath xlink:href="#path1050" /> </animateMotion> 路徑起點要在畫板的左上角。如果提示沒有定義命名空間則加上xmlns:xlink="http://www.w3.org/1999/xlink" 如果開啟rotate="auto",那就必須把要移動的元素的x跟y刪掉或等於0,再把路徑起始點移到元素起始處。 動畫 <animate attributeName="y" fill="freeze" id="aa3" begin="aa2.end" dur="1s" values="100;150" /> 這個似乎比animateMotion更好用。 移形animateTransform MDN介紹 示例: <svg width="120" height="120" viewBox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <polygon points="60,30 90,90 30,90"> <animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0 60 70" to="360 60 70" dur="10s" repeatCount="indefinite"/> </polygon> </svg> 根據這裏的描述,如果想添加多個animateTransform就需要套多層<g></g>。但是後来發現這個說法是錯的,正確操作是加入屬性additive="sum",来自這裏。(update ... Read more

🎒unicode cjk 查詢

unicode轉碼

字頻:



glyph

十進制跟十六進制轉換



下面是unicode所有漢字收字範圍:

Read more

🚛經典編輯器如何輸入代碼

我發現經典編輯器輸入的代碼,一些標籤會消失。 正確的輸入方法是,把<code></code>先在源碼中輸入,轉回原来的可視編輯器,再貼上代碼,這樣尖括號才會自動轉為&lt;和&gt;。 update at 2023-12-06: 以上做法會使空格或tab縮進消失。如果希望保留縮進,則應先將代碼用regexp把其中的「<、>、&」替換為「&lt;、&gt;、&amp;」,之後於源碼中粘貼。 <,&lt; >,&gt; &,&amp;