修正一些注意点
- <link rel="icon" href="#"> 设置网页图标。
<link rel="icon" href="#">
-
对浏览器进行判断,例如IE8以下的版本可见
<!--[if lt IE 8]>
<![endif]-->
- css样式尽量写在css样式表中,方便查找修改,更新维护的时候只需要替换对应的样式表即可,都写在html里是可维护性最差的方案。
- 文件名需要用对应的英文名。可以采用驼峰命名。
尝试使用了zui的组织结构图 ,用法是引入css和js。
<link href="lib/treemap/zui.treemap.min.css" rel="stylesheet">
<script src="lib/treemap/zui.treemap.min.js"></script>
<div id="treemap"></div>
$('#treemap').treemap({
data: {
text: '蔬菜',
children: [{
html: '<i class="icon icon-heart text-danger"></i> 我的菜',
children: [{
textColor: 'green',
text: '青菜'
}, {
html: '<span class="text-info">菠菜</span>'
}]
}, {
text: '你的瓜',
style: {border: '1px solid green'},
collapsed: true,
tooltip: '点击展开或折叠',
children: ['南瓜', '西瓜', '丝瓜', '苦瓜']
}, {
text: '甘蓝',
children: ['大甘蓝']
}, {
color: 'orange',
textColor: 'white',
text: '土豆'
}]
}
});