自己改了一个图文的排行榜
支持dzx2.0
直接在diy里调用
代码如下
希望各位大大美化一下或者能放出更好的代码- <script type="text/javascript">
- function nTabs(thisObj,Num){
- if(thisObj.className == "active")return;
- var tabObj = thisObj.parentNode.id;
- var tabList = document.getElementById(tabObj).getElementsByTagName("li");
- for(i=0; i <tabList.length; i++)
- {
- if (i == Num)
- {
- thisObj.className = "active";
- document.getElementById(tabObj+"_Content"+i).style.display = "block";
- }else{
- tabList[i].className = "normal";
- document.getElementById(tabObj+"_Content"+i).style.display = "none";
- }
- }
- }
- var show_king_id = 1;
- function show_king_list(e,k)
- {
- if(show_king_id == k) return true;
- o = document.getElementById("a"+show_king_id);
- o.className = "bg";
- e.className = " ";
- show_king_id = k;
- }
- var show_kinga_id = 1;
- function show_kinga_list(f,l)
- {
- if(show_kinga_id == l) return true;
- o = document.getElementById("b"+show_kinga_id);
- o.className = "bg";
- f.className = " ";
- show_kinga_id = l;
- }
- </script>
- <style type="text/css">
- *{
- margin: 0;
- padding: 0;
- }
- body {
- font-size:12px;
- font-family:Arial, Helvetica, sans-serif;
- color:#666666;
- }
- .door_container {
- width:204px; background:#fff; border:1px solid #ccc;
- margin:20px auto;
- }
- .door_container .TabTitle {
- height:30px; margin-bottom:6px;
- }
- .door_container .TabTitle li {
- list-style:none;
- float:left;
- width:100px;
- height:36px;
- cursor:pointer;
- padding-left:2px;
- line-height:28px;
- color:#7c7c7c;
- font-size:14px;
- text-align:center;
- font-weight:bold;
- background:#DDDDDD;
- }
- .door_container .TabTitle .active {
- color:#339966;
- background:#fff;
- }
- .door_container .TabTitle .normal {
- color:#7c7c7c;
- }
- .door_container .TabContent {
- width:198px; background:#fff; padding:3px;
- }
- .none {
- display: none;
- }
- .star{
- width:198px;
- overflow:hidden;
- white-space:nowrap;
- text-overflow:ellipsis;
- }
- .star dl{
- width:198px;
- margin:2px 0;
- float:left;
- }
- .star dl dd{
- float:left;
- margin-left:8px;
- line-height:18px;
- }
- .star dl dt{
- float:left;
- }
- .bg{
- width:198px;
- margin:2px 0;
- background:#e1e1e1;
- float:left;
- }
- .sl01{
- background:#339966;
- margin:15px 5px 0 5px;
- width:25px;
- height:18px;
- padding-top:7px;
- text-align:center;
- font-weight:bold;
- color:#FFF;
- }
- .sl02 img{
- border:1px solid #999999;
- padding:3px;
- }
- .sl03 a{
- text-decoration:underline;
- }
- .sl03 a:hover{
- color:#FF0084;
- text-decoration:none;
- }
- .sl04{
- background:#CCCCCC;
- }
- .sl05{
- color:#FF0084;
- }
- .bg .sl01{
- background:#fff;
- margin:5px 5px 0 5px;
- width:25px;
- height:18px;
- padding-top:7px;
- text-align:center;
- font-weight:bold;
- color:#339966;
- }
- .bg .sl02 img{
- display:none;
- }
- .bg .sl03{
- width:140px;
- }
- .bg .sl04{
- background:#CCCCCC;
- width:155px;
- }
- .bg .sl05{
- display:none;
- }
- </style>
- <div id=myTab_Content0>
- <div class="star">
- [loop]
- <dl id=a1 onmouseover=show_king_list(this,1);>
-
- <dt class="sl02"><a href="{url}"><img src="{pic}" width="{picwidth}" height="{picheight}" alt="{title}" /></a><a href="{url}">{title}</a></dt>
- <dd class="sl03"></dd>
- <dd class="sl04">{dateline}</dd>
- <dd class="sl05">{summary}</dd>
- </dl>
- [/loop]
- [order=1]
- <dl class=bg id=a2 onmouseover=show_king_list(this,2);>
- <dt class="sl02"><a href="{url}"><img src="{pic}" width="{picwidth}" height="{picheight}" alt="{title}" /></a></dt>
- <dd class="sl03"><a href="{url}">{title}</a></dd>
- <dd class="sl04">{dateline}</dd>
- <dd class="sl05">{summary}</dd>
- </dl>
- [/order]
- [order=2]
- <dl class=bg id=a3 onmouseover=show_king_list(this,3);>
-
- <dt class="sl02"><a href="{url}"><img src="{pic}" width="{picwidth}" height="{picheight}" alt="{title}" /></a></dt>
- <dd class="sl03"><a href="{url}">{title}</a></dd>
- <dd class="sl04">{dateline}</dd>
- <dd class="sl05">{summary}</dd>
- </dl>
- [/order]
- [order=3]
- <dl class=bg id=a4 onmouseover=show_king_list(this,4);>
-
- <dt class="sl02"><a href="{url}"><img src="{pic}" width="{picwidth}" height="{picheight}" alt="{title}" /></a></dt>
- <dd class="sl03"><a href="{url}">{title}</a></dd>
- <dd class="sl04">{dateline}</dd>
- <dd class="sl05">{summary}</dd>
- </dl>
- [/order]
- [order=4]
- <dl class=bg id=a5 onmouseover=show_king_list(this,5);>
-
- <dt class="sl02"><a href="{url}"><img src="{pic}" width="{picwidth}" height="{picheight}" alt="{title}" /></a></dt>
- <dd class="sl03"><a href="{url}">{title}</a></dd>
- <dd class="sl04">{dateline}</dd>
- <dd class="sl05">{summary}</dd>
- </dl>
- [/order]
- [order=5]
- <dl class=bg id=a6 onmouseover=show_king_list(this,6);>
-
- <dt class="sl02"><a href="{url}"><img src="{pic}" width="{picwidth}" height="{picheight}" alt="{title}" /></a></dt>
- <dd class="sl03"><a href="{url}">{title}</a></dd>
- <dd class="sl04">{dateline}</dd>
- <dd class="sl05">{summary}</dd>
- </dl>
- [/order]
- [order=6]
- <dl class=bg id=a7 onmouseover=show_king_list(this,7);>
-
- <dt class="sl02"><a href="{url}"><img src="{pic}" width="{picwidth}" height="{picheight}" alt="{title}" /></a></dt>
- <dd class="sl03"><a href="{url}">{title}</a></dd>
- <dd class="sl04">{dateline}</dd>
- <dd class="sl05">{summary}</dd>
- </dl>
- [/order]
- [order=7]
- <dl class=bg id=a8 onmouseover=show_king_list(this,8);>
- <dt class="sl02"><a href="{url}"><img src="{pic}" width="{picwidth}" height="{picheight}" alt="{title}" /></a></dt>
- <dd class="sl03"><a href="{url}">{title}</a></dd>
- <dd class="sl04">{dateline}</dd>
- <dd class="sl05">{summary}</dd>
- </dl>
- [/order]
- [order=8]
- <dl class=bg id=a9 onmouseover=show_king_list(this,9);>
-
- <dt class="sl02"><a href="{url}"><img src="{pic}" width="{picwidth}" height="{picheight}" alt="{title}" /></a></dt>
- <dd class="sl03"><a href="{url}">{title}</a></dd>
- <dd class="sl04">{dateline}</dd>
- <dd class="sl05">{summary}</dd>
- </dl>
- [/order]
- [order=9]
- <dl class=bg id=a10 onmouseover=show_king_list(this,10);>
-
- <dt class="sl02"><a href="{url}"><img src="{pic}" width="{picwidth}" height="{picheight}" alt="{title}" /></a></dt>
- <dd class="sl03"><a href="{url}">{title}</a></dd>
- <dd class="sl04">{dateline}</dd>
- <dd class="sl05">{summary}</dd>
- </dl>
- [/order]
-
- </div>
- </div>
复制代码 |