以下是 jQuery百度新闻热搜词js代码 的示例演示效果:
部分效果截图:
HTML代码(index.html):
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery百度新闻热搜词代码</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script src="js/jquery.js" language="javascript" type="text/javascript"></script>
</head>
<body>
<script type=text/javascript src="js/damai_ui-min.js"></script>
<div class="itagBox">
<ul class="artist_l">
<li class="tag1">
<div class="tag_txt">
中南财经政法大学新闻与传播<br />考研<span class="tag_yellow">精英保录</span>班
</div>
<a href="#">中南财经政法大学新闻与传播<br />考研<span class="tag_yellow">精英保录</span>班</a>
</li>
<li class="tag1 tag2">
<div class="tag_txt">
中南财经政法大学新闻与传播<br />考研<span class="tag_yellow">1对1定制保过</span>班
</div>
<a href="#">中南财经政法大学新闻与传播<br />考研<span class="tag_yellow">1对1定制保过</span>班</a>
</li>
<li>
<div class="tag_txt">
政英全程联报班<br />政英数联报班
</div>
<a href="#">政英全程联报班<br />政英数联报班</a>
</li>
<li class="tag3">
<div class="tag_txt">
中南财经考研<br />在线答疑
</div>
<a href="#">中南财经考研<br />在线答疑</a>
</li>
<li>
<div class="tag_txt">
政英全程联报班<br />政英数联报班
</div>
<a href="#">政英全程联报班<br />政英数联报班</a>
</li>
<li class="tag3">
<div class="tag_txt">
中南财经考研<br />在线答疑
</div>
<a href="#">中南财经考研<br />在线答疑</a>
</li>
<li class="tag1">
<div class="tag_txt">
中南财经政法大学新闻与传播<br />考研<span class="tag_yellow">精英保录</span>班
</div>
<a href="#">中南财经政法大学新闻与传播<br />考研<span class="tag_yellow">精英保录</span>班</a>
</li>
<li class="tag1 tag2">
<div class="tag_txt">
中南财经政法大学新闻与传播<br />考研<span class="tag_yellow">1对1定制保过</span>班
</div>
<a href="#">中南财经政法大学新闻与传播<br />考研<span class="tag_yellow">1对1定制保过</span>班</a>
</li>
<li>
<div class="tag_txt">
政英全程联报班<br />政英数联报班
</div>
<a href="#">政英全程联报班<br />政英数联报班</a>
</li>
<li class="tag1 tag2">
<div class="tag_txt">
中南财经政法大学新闻与传播<br />考研<span class="tag_yellow">1对1定制保过</span>班
</div>
<a href="#">中南财经政法大学新闻与传播<br />考研<span class="tag_yellow">1对1定制保过</span>班</a>
</li>
<li class="tag1">
<div class="tag_txt">
中南财经政法大学新闻与传播<br />考研<span class="tag_yellow">精英保录</span>班
</div>
<a href="#">中南财经政法大学新闻与传播<br />考研<span class="tag_yellow">精英保录</span>班</a>
</li>
<li class="tag3">
<div class="tag_txt">
中南财经考研<br />在线答疑
</div>
<a href="#">中南财经考研<br />在线答疑</a>
</li>
</ul>
</div>
</body>
</html>
CSS代码(style.css):
@charset "utf-8";body,ul,dl,dd,dt,ol,li,p,h1,h2,h3,h4,h5,h6,textarea,form,select,fieldset,table,td,div,input{margin:0;padding:0;-webkit-text-size-adjust:none}
h1,h2,h3,h4,h5,h6{font-size:12px;font-weight:normal}
a img{border:0}
body{color:#333;text-align:center;font:12px "宋体";}
ul,ol,li{list-style-type:none;vertical-align:0}
a{outline-style:none;color:#535353;text-decoration:none}
a:hover{color:#D40000;text-decoration:none}
.itagBox{margin:10px auto 0px;clear:both;width:650px;overflow:hidden;}
.itagBox ul{width:700px;}
.itagBox ul li{position:relative;float:left;width:110px;background:#5C9FE1;height:80px;color:#FFF;font-weight:bold;overflow:hidden;margin:0px 6px 6px 0px;}
.itagBox ul .tag1{width:206px;}
.tag_yellow{color:#fff601;}
.tag_txt{text-align:center;line-height:20px;padding-top:22px;}
.itagBox ul li a{overflow:hidden;position:absolute;left:0px;top:0px;line-height:20px;text-align:center;padding-top:5px;display:block;color:#FFF;width:100%;height:75px;/*filter:alpha(opacity=90);background:#000;opacity:0.8;*/
background:rgba(0,0,0,0.8)}
.itagBox ul li a:hover{color:#FFF;text-decoration:none;}
.itagBox ul .tag2{background:#2E71B3;}
.itagBox ul .tag3{background:url(../images/itagBg.jpg) no-repeat center center;}