使用jQuery美化英雄联盟
点击之后
<script type="text/javascript">
$(function () {
$(p).click(function () {
$(.txt_box>.current).css(background, #6FF);
$(#content>span).css(background, #F9F);
// $(#content).find(span).css(background, #F9F);
$(h1+p).css(background, #F06);
//$(h1).next().css(background, #F06);
$(strong span).css(background, #00C);
});
});
</script>
<body>
<h1>英雄联盟</h1>
<p>
《英雄联盟》,简称LOL。
</p>
<p id="content">
由<strong>Riot Games </strong>开发,为3D竞技场战游戏,其
<span>
主创团队由实力强劲的
<strong>魔兽争霸</strong>
系列游戏多人<span>即时对战</span>自定义地图开发团队
</span>...
<a href="#">更多详情</a>
</p>
<h2>
目录
</h2>
<ul class="txt_box">
<li class="current">开发团队</li>
<li>游戏周边</li>
<li>游戏介绍</li>
<li>配置需求</li>
<li>游戏背景</li>
</ul>
</body>
