绝对定位:JS照样实现瀑布流式布局(2)_建站经验教程

编辑Tag赚U币
教程Tag:暂无Tag,欢迎添加,赚取U币!

推荐:从搜索营销过程找营销效果提升关键
通过搜索引擎进行营销,成为越来越多企业的营销手段,营销市场确实很大,可能否从中分一杯羹呢?

                                                        oLi.innerHTML='<img src="'+list.src[j]+'"><p>'+list.title[j]+'</p>'

                                                        oUl[i].appendChild(oLi);

                                                }

                                        }

                                })

                        }

                }

        }

 

        function toTop(obj)

        {

                var top=0;

                while(obj)

                {

                        top +=obj.offsetTop;

                        obj=obj.offsetParent       

                }

                return top;

        }

}

</script>

 

在html的head中,加入<script src="js/*.js" type="text/javascript"></script>

注:不能是<script src="js/*.js" type="text/javascript"/>JS部分处理完毕之后,接下来就是HTML代码部分的书写:

 

 [HTML]代码

 

 <div id='div'>
                <ul>
                        <li>
                                <img src="images/1.jpg">
                                <p>11111111</p>
                        </li>
                        <li>
                                <img src="images/2.jpg">
                                <p>11111111</p>
                        </li>
                        <li>
                                <img src="images/3.jpg">
                                <p>11111111</p>
                        </li>
                        <li>
                                <img src="images/4.jpg">
                                <p>11111111</p>
                        </li>
                </ul>
                <ul>
                        <li>
                                <img src="images/5.jpg">
                                <p>11111111</p>
                        </li>
                        <li>
                                <img src="images/6.jpg">
                                <p>11111111</p>
                        </li>
                                        </ul>
        </div> 

 

 [AJax封装文件 ]代码

分享:云数据-租用香港服务器有哪些优点呢?
现在企业间的竞争十分的激烈。因此不论是大型企业还是小型企业都采用建设属于自己网站的方式来进行自己的产品宣传以及公司形象传播! 但是,对于一些还在创业期的企业来说,建设一个网站往往就是一件比较麻烦而且比较复杂的事情!因为建设一个网站就需要有自己的独立服

来源:模板无忧//所属分类:建站经验教程/更新时间:2013-04-17
相关建站经验教程