由于在没有规划好的情况下写的这个代码,写的比较粗糙,也没有添加注释。
主要特点:Javascript代码和HTML完全分离;可以随意添加多个子div标签,自动扩展
Javascript代码:
复制代码 代码如下:
#tag {
border: 1px solid #eee;
float: left;
} #tag span {
border: 1px dotted #ccc;
background: #eee;
padding: 1px 6px;
margin-right: 8px;
} #tag span:hover {
background: #ccc;
border: 1px solid #666;
}
HTML代码:
复制代码 代码如下:
Tag demo 1,
I will achive it.
Tag demo 2,
I will achive it.
Tag demo 3,
I will achive it.
Tag demo 4,
I will achive it.
Tag demo 5,
I will achive it.
Tag demo 6,
I will achive it.



