PROGRAMS LÀM SAO CHỚP CHẠY
1-SAO CHẠY TRÊN ELLIPSE VÀ CHỚP
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">
// viết nút Start và Stop
<g id ="B">
<text x="180" y="150"
font-size ="25" fill="blue" >START</g>
<g id = "S">
<text x="280" y="150"
font-size ="25" fill="red" >STOP</g>
<g>
<circle cx="50" cy="50"
r="20" fill="red"
stroke="blue" stroke-width="18" transform="translate(-45,-50)">
//làm chớp như sau
<animate attributeName="stroke" begin="B.click"
from="yellow"
repeatCount="indefinite" to="blue"
dur="3s" end="S.click"/>
</animate>
//làm di chuyển như sau.
<animateMotion
path =" M 275,275 a150, 75, 0,1,1, 0,009 z"//không có d
stroke="blue" stroke-width="3"
fill="none" rotate="auto"
begin="B.click"dur="10s"
repeatCount="indefinite"end="S.click"/>
</animateMotion>
</circle>
</g>
<g>
// làm ellipse xuất hiện như sau.
<path id="ellipse"
d="M 275,275 a150,
75, 0,1,1, 0,009 z " stroke="blue"
stroke-width="3" fill="none"/
</g</svg>
---------------------------------------------------------------------
2-SAO ĐỨNG YÊN VÀ CHỚP.
<svg
xmlns="http://www.w3.org/2000/svg" width="100%"
height="100%">
// viết Start và Stop
<g id ="B">
<text x="180" y="150"
font-size ="25" fill="blue"> START</g>
<g id = "S">
<text x="280" y="150"
font-size ="25" fill="red">STOP</g>
<g>
<circle cx="340" cy="275"
r="20" fill="red"
stroke="blue" stroke-width="18" transform="translate(-45,-50)">
// làm sao chớp như sau
<animate attributeName="stroke"
begin="B.click"
from="yellow"
repeatCount="indefinite" to="blue"
dur="3s" end="S.click"/>
</animate>
</circle> </g>
</svg>
-------
GHI CHÚ.
1-COPY HAI PROGRAMS NÂỲ RÔI POST VÀO NOTEPAD.
2-SAVE TÊN CHO PROGAMS THEO DẠNG
HTML TRONG DOCUMENT.
Thí dụ đặt tên là “SAO CHOP.html”
3-SEND TÊN SAO CHOP.html CỦA PROGRAMS TRONG DOCUMENT RA DESKTOP.
KICK SAO CHOP.html cuả DESKTOP VA MỜ RA B̀ẰNG BROWSER GOOGLE SẼ THẤY HÍỆN HÌNH.
PHỨC TẠP QUANH CO QUÝ Bạn Ta
Nếu không hiêu được tránh xa cho rồi.