div鼠标指向文字与背景变换
2012-09-06 09:58
309 查看
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
#rightmenu {
margin: 0;
padding: 0;
}
#rightmenu a {
display: block;
background: #BF3E18 url(images/vmenuarrow.gif)
no-repeat center left;
color: #FFFFFF;
padding: 5px 0 5px 19px;
margin: 0 0 1px 0;
text-decoration: none;
}
#rightmenu a:hover {
color: #000;
background: #822C0F
url(images/vmenuarrowhover.gif) no-repeat center left;
}
-->
</style>
<div id="rightmenu"><a
href="http://sina.com.cn/jieeeee">花年记事</a><a
href="http://sina.com.cn/jieeeee">花年记事</a><a
href="http://sina.com.cn/jieeeee">花年记事</a><a
href="http://sina.com.cn/jieeeee">花年记事</a></div>
鼠标指向图片变换(也是背景)
.pus_01{ width:197px; height:197px; float:left;}
.pus_01 a.more{
background:url(cp/c_01.jpg) no-repeat 0 0
#FFFFFF; color:#000000;
width:197px; height:197px; display:block;
float:right;
text-decoration:none; text-indent:-2000px;
padding:0; line-height:0;}
.pus_01 a.more:hover{
background:url(cp/c_001.jpg) no-repeat 0 0
#FFFFFF; color:#000000;}
---------------------------------------------------------------------------CSS样式
<div
class="pus_01"><a href="#"
title="more"
class="more">moer</a></div>
<!--
body,td,th {
font-size: 12px;
}
#rightmenu {
margin: 0;
padding: 0;
}
#rightmenu a {
display: block;
background: #BF3E18 url(images/vmenuarrow.gif)
no-repeat center left;
color: #FFFFFF;
padding: 5px 0 5px 19px;
margin: 0 0 1px 0;
text-decoration: none;
}
#rightmenu a:hover {
color: #000;
background: #822C0F
url(images/vmenuarrowhover.gif) no-repeat center left;
}
-->
</style>
<div id="rightmenu"><a
href="http://sina.com.cn/jieeeee">花年记事</a><a
href="http://sina.com.cn/jieeeee">花年记事</a><a
href="http://sina.com.cn/jieeeee">花年记事</a><a
href="http://sina.com.cn/jieeeee">花年记事</a></div>
鼠标指向图片变换(也是背景)
.pus_01{ width:197px; height:197px; float:left;}
.pus_01 a.more{
background:url(cp/c_01.jpg) no-repeat 0 0
#FFFFFF; color:#000000;
width:197px; height:197px; display:block;
float:right;
text-decoration:none; text-indent:-2000px;
padding:0; line-height:0;}
.pus_01 a.more:hover{
background:url(cp/c_001.jpg) no-repeat 0 0
#FFFFFF; color:#000000;}
---------------------------------------------------------------------------CSS样式
<div
class="pus_01"><a href="#"
title="more"
class="more">moer</a></div>
相关文章推荐
- JS+DIV表单实例——鼠标移上背景变色和文字提示
- 纯DIV+CSS圆角背景随按钮文字增多而增宽自适应,鼠标经过背景变化按钮型模块。
- JS+DIV表单实例&#8212;&#8212;鼠标移上背景变色和文字提示
- JS+DIV表单实例——鼠标移上背景变色和文字提示
- CSS+DIV实现鼠标经过背景变色
- 当鼠标放在div上时改变背景颜色
- 最简单的背景颜色、背景图颜色鼠标滑过变换
- 鼠标浮在行之上时改行文字和背景反色
- [css特效]A标记的经典效果:鼠标放到A的整行上,背景变色(鼠标没在文字上)
- jQuery实现基于鼠标滑动改变按钮背景图片、文字
- css鼠标移动到文字上怎样变化背景颜色
- CSS+DIV实现鼠标经过背景变色
- 鼠标移动显示 div 图片 文字效果
- 00002、div的文字垂直居中与背景的渐变
- 点击按钮/文字弹出背景变暗的可拖动的DIV提示层
- CSS+JS控制鼠标滑向表格变换背景图片代码
- WPF 实现DataGrid行鼠标经过、点击时的背景、文字、行高等样式
- 鼠标悬浮显示文字半透明背景
- div半透明背景,文字不透明
- 网页 div(背景)随鼠标成动态效果