可以先看看示例。
1a.添加jQuery代码
下载jQuery,在标签之间如下添加jQuery代码:
代码如下:
输出html源码:
1b.CSS编码
相应的运用背景图片样式化
代码如下:
#step .item1 {
background: url(step1.png) no-repeat;
}
#step .item2 {
background: url(step2.png) no-repeat;
}
#step .item3 {
background: url(step3.png) no-repeat;
}
2a.添加连续的内容
你也可以运用这种技巧添加有序的内容,运用jQuery的prepend方法。下面就采用此种方法生成计数的留言列表。
代码如下: