`
jsntghf
  • 浏览: 2476697 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
社区版块
存档分类
最新评论

随机显示图片

阅读更多
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
        <title>随机显示图片</title>
        <style type="text/css">
            *{margin:0;padding:0;}
            img{border:0;}
            body {color:black;background: white;font:12px 宋体, Verdana, serif, sans-serif;text-align:center;}
            ul {list-style:none;}
            #newsImg {width:690px;text-align:center;margin:100px auto;}
            #newsImg ul{}
            #newsImg li{float:left;margin-right:10px;padding:1px;background:#CCC;}
            #newsImg a{display:block;width:160px;height:110px;}
            #newsImg img,#newsImg span{display:block;}
            #newsImg span {height:20px;line-height:20px;background:#f7f7f7;width:160px;} 
        </style>
    </head>	
    <body>
        <div id="newsImg">
            <p>正在加载图片...</p>
        </div>
        <script type="text/javascript" src="news.js"></script>
    </body>
</html>

 

JS部分参考附件。

 

效果图:


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics