鼠标移动到图片上显示阴影和图片上的文字
2013-05-04 21:33
751 查看
<style type="text/css"> .bg_a { position:absolute; width:156px; height:112px; background:#fff; } .ptitle { width:156px; position:absolute; z-index:9; left:0px; bottom:0px; height:24px; line-height:25px; margin:0 auto; text-align:center; color:#fff; } .pic { width: 156px; height: 112px; top : 16px; } .digest { width:156px; position:absolute; z-index:9; left:0px; top:-16px; height:112px; display:none; color:#fff; } .dig_bg { width: 156px; height: 112px; position: absolute; z-index:8; left:0px; top : -16px; background-color: #000; opacity: 0.4; filter:alpha(Opacity=80); -moz-opacity:0.5; display: none; } a { text-decoration:none; cursor:pointer; } .digest { display:none; } </style> </head> <body> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script type="text/javascript"> function run() { tall.style.display = "block"; pt.style.display = "none"; dig_bg.style.display = "block"; } function out() { tall.style.display = "none"; pt.style.display = "block"; dig_bg.style.display = "none"; } </script> <div> <div class="bg_a" onmouseover="run()" onmouseout="out()"> <img class="pic" src="http://img1.cache.netease.com/cnews/2013/5/2/2013050211063877d04.jpg" /> <p id="dig_bg" class="dig_bg"></p> <p id="tall" class="digest">近日,龚玥菲露巨乳的造型瞬间赢得上海车展众宅男芳心,吴莫愁也前来助阵,一席白色蕾丝曼妙多姿。</p> <p class="title_bg"></p> <p id="pt" class="ptitle">吴莫愁齐P透视现车展</p> </div>
阴影位置的定位,还不完善。但经过我不完善的调整效果是有了。
鼠标移动到图片上显示阴影和图片上的文字
相关文章推荐
- 55-002-1 HTML5图片列表页面的制作 鼠标移动图片动态显示,文字动态阴影效果,渐变效果 列表前增加样式序列号
- HTML鼠标移动到图片上时显示阴影边框
- 鼠标移动到某文字上然后显示图片
- HTML基础 img标签title属性 鼠标移动到图片上时显示文字
- 鼠标移动显示 div 图片 文字效果
- 鼠标移动到图片上,图片显示阴影边框,其他一些样式积累
- Jquery之鼠标移动到图片上显示文字并且文字可以点击
- 关于在eclipse开发web时鼠标移动到图片上显示文字问题
- 用CSS设置当鼠标移动到图片内时显示文字
- [javascript]鼠标滑过列表文字显示图片及详细信息
- 随着鼠标移动的文字阴影
- html 在一个超链接上面,鼠标移动上去时,也显示一串文字,如何实现
- css3实现小米商城鼠标移动图片上浮阴影效果
- 鼠标滑过列表文字显示图片及详细信息信息信息
- jquery 实现超出部分隐藏,鼠标移动上显示全部文字
- 鼠标移动在文字上面,让其显示详细信息
- AJAX练习3--鼠标移动到指定的图片显示相应的该图片的信息
- DIV CSS鼠标经过悬停在图片上时图片上方显示文字(转)
- 一张图片由A、B两部分组成,当鼠标移动上去时显示B部分,当鼠标移出时显示A部分。