寻仿腾讯的图片新闻页的切换效果

oYiShuo 2012-11-07 03:06:25
之前在网上找到类似的,但是用不了大图,修改参数会出现很多BUG。

链接地址http://news.qq.com/a/20121009/001005.htm

有肯帮忙的朋友万谢啊
...全文
187 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
dy_love_wade 2012-11-07
  • 打赏
  • 举报
回复
我们才学了这个,lightbox <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>CSS Lightbox效果</title> <style> body{font-size:11px; font-family:Verdana, Arial, Helvetica, sans-serif;} a{color:#000; text-decoration:none;} .img{border:0px;} .black_overlay{ display: none; position: absolute; top: 0%; left: 0%; width: 100%; height: 100%; background-color: black; z-index:1000; -moz-opacity: 0.8; opacity:.80; filter: alpha(opacity=80); } .white_content { display: none; position: absolute; top: 15%; left: 25%; width: 575px; height: 445px; border: 16px solid #FFF; border-bottom:none; background-color: white; z-index:1002; overflow: auto; } </style> </head> <body> <p><a href = "#" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'"><img src="images/small.jpg" width="120" border="0"/></a></p> <div id="light" class="white_content"><img src="images/big.jpg" border="0" width="540"/> <a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">Close</a></div> <div id="fade" class="black_overlay"></div> </body> </html>
mykelly6 2012-11-07
  • 打赏
  • 举报
回复
用jquery的lightbox插件试试。

87,992

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧