คลังความรู้ ระบบสารสนเทศ

การเอารูปภาพมาวางบน web ด้วย HTML5

โดย สมโภชน์ กุลธารารมณ์

<!doctype html>
<html><head><title>test HTML5</title></head>
<body>
<svg id=”svgelem” height=”200″ xmlns=”http://www.w3.org/2000/svg”>
<defs>
<radialGradient id =”gradient” cx=”50%” cy=”50%” r=”50%” fx=”50%” fy=”50%”>
<stop offset=”0%” style=”stop-color:rgb(200,200,200); stop-opacity:0″/>
<stop offset=”100%” style=”stop-color:rgb(0,0,255); stop-opacity:1″/></radialGradient>
</defs>
<image xlink:href= “13.gif” x=”10″ y=”10″ width=”200″ height=”200″/>
</svg>
</body>
</html>

วิธีทำต้อง load รูปภาพไปไว้ใน Inetpub\wwwroot ก่อน

และเมื่อกด CTRL+ หรือ CTRL- จะสามารถขยายหรือลดขนาดรูปได้โดยภาพไม่แตก