<!DOCTYPE html> <html> <head> <script type="text/javascript">
// This function is called when the circle is clicked.
function clickMe() {
// Display the alert.
alert("You clicked the SVG UI element.");
} </script> </head> <body> <h1>
SVG User Interface </h1> <!-- Create the SVG pane. --> <svg>
<!-- Create the circle. -->
<circle cx="100" cy="100" r="50" fill="gold"
/> </svg> <p>
Click on the gold circular user interface element. </p> </body> </html>
这个例子虽然简单,但是具备了用户界面的一切特性,从这个例子中我们再次领略了svg便捷的交互性。
最后用一幅图来总结一下每种应用适合的技术,图中每个方块代表一类应用,越靠近某一端,说明采用该技术越具有的优势:
实用参考: 脚本索引:(v=vs.85).aspx 开发中心:https://developer.mozilla.org/en/SVG 热门参考: 官方文档: (编辑:焦作站长网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|