怎么用css 当鼠标一经过图片切换或者变颜色???
2个回答
2013-06-30
展开全部
需要配合javascript来实现<img src="" onmouseover="style.color=newcolor;" onmouseout="style.color=oldcolor;" />
2013-06-30
展开全部
<!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=gb2312" />
<title>无标题文档</title>
<style>
body
{
background-color:#000000;
margin-left:0;
margin-top:0;
margin-bottom:0;
margin-right:0;
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
color: #666666;}
#news{
width:285px;
height:22px;
background-color:#eeeeee}
#news2{
width:280px;
height:22px;
font-family:"宋体";
font-size:12px;
color:#666666;
float:left;
padding-top:2px;
padding-left:10px;
}
#contents_left_R{
width:290px;
height:150px;
float:left;
border:1px;
border:dotted;}
div.news2:hover {
background:#ccc;
}
</style>
</head>
<body>
<div id="contents_left_R">
<div class="bigtitle" id="news">我的故事</div>
<div class="news2">[2006/7/1]再见我的爱人</div>
<div class="news2">[2006/7/1]再见我的爱人</div>
<div class="news2">[2006/7/1]再见我的爱人</div>
<div class="news2">[2006/7/1]再见我的爱人</div>
<div class="news2">[2006/7/1]再见我的爱人</div>
<div class="news2">[2006/7/1]再见我的爱人</div>
</div>
</body>
</html>
<html xmlns=" http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style>
body
{
background-color:#000000;
margin-left:0;
margin-top:0;
margin-bottom:0;
margin-right:0;
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
color: #666666;}
#news{
width:285px;
height:22px;
background-color:#eeeeee}
#news2{
width:280px;
height:22px;
font-family:"宋体";
font-size:12px;
color:#666666;
float:left;
padding-top:2px;
padding-left:10px;
}
#contents_left_R{
width:290px;
height:150px;
float:left;
border:1px;
border:dotted;}
div.news2:hover {
background:#ccc;
}
</style>
</head>
<body>
<div id="contents_left_R">
<div class="bigtitle" id="news">我的故事</div>
<div class="news2">[2006/7/1]再见我的爱人</div>
<div class="news2">[2006/7/1]再见我的爱人</div>
<div class="news2">[2006/7/1]再见我的爱人</div>
<div class="news2">[2006/7/1]再见我的爱人</div>
<div class="news2">[2006/7/1]再见我的爱人</div>
<div class="news2">[2006/7/1]再见我的爱人</div>
</div>
</body>
</html>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询