<!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>
<style type="text/css">
.title{ height:20px; width:200px; background-color:#CCC;}
.texts{width:200px; height:200px; margin-top:5px; background-color:#CCCC99; panding:5px;}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery
/jquery-1.4.min.js"></script>
<script type="text/javascript">
function show1(){
$(".texts").css("background","url(http://hi.csdn.net/attachment/201108/4/0_131242481811EP.gif)");
}
</script>
</head>
<body>
<div class="box">
<div class="title">
<span> <a href="#" οnmοuseοver="show1()">标题一</a></span>
</div>
<div class="texts">
<span id="span1">标题一的内容</span>
</div>
</div>
</body>
</html>
jQuery 修改css效果
最新推荐文章于 2024-07-26 08:00:00 发布