background-attachmen视差滚动效果
发布日期:2018-04-25摘要:文章目录索引(?) [-] 文章简介 代码演示文章简介一般有些时间,背景放了一个大图,上面再放个透明的图(如地图等),然后随着滚轮滚动,形成一种视差,主要是用到background-att...
文章目录索引(?) [-]
- 文章简介 代码演示
文章简介
一般有些时间,背景放了一个大图,上面再放个透明的图(如地图等),然后随着滚轮滚动,形成一种视差,主要是用到background-attachment: fixed;属性。
代码演示- <style>.fl{float:left!important;_display:inline;}
- .main2{background-image:url(main1_lc.jpg);background-repeat:no-repeat;background-position:center;background-attachment:fixed;}.wrap{width:1000px;height:1830px;margin:0pxauto;overflow:hidden;line-height:24px;}
- .main2_of1{margin:200px000;}.main2_of2{margin:55px0020px;width:450px;border-left:#fff1pxsolid;color:#fff;position:relative;height:605px;}
- .main2_of2dl{position:absolute;left:-9px;top:-25px;}.main2_of2dt{background:url(main1_r.png)no-repeat;font:40018px/18px"宋体";color:#040404;font-size:18px;padding:010px025px;width:75px;text-align:center;}
- .main2_of2dd{width:345px;line-height:20px;}.main2_of2dd{float:left;margin:20px000;}
- </style><divclass="main2">
- <divclass="wrap"><h3><imgsrc="main2.png"></h3>
- <divclass="flmain2_of1"><imgsrc="main2_l.png"></div><divclass="flmain2_of2">
- <dl><dt>2004</dt>
- <dd>www.pc811.comwww.pc811.comwww.pc811.comwww.pc811.comwww.pc811.com</dd><dt>2005</dt>
- <dd>www.pc811.comwww.pc811.comwww.pc811.comwww.pc811.comwww.pc811.com。</dd><dt>2006</dt>
- <dd>www.pc811.comwww.pc811.comwww.pc811.comwww.pc811.com</dd><dt>2007</dt>
- <dd>www.pc811.com</dd><dt>2008</dt>
- <dd>www.pc811.com</dd><dt>2009</dt>
- <dd>www.pc811.com</dd><dt>2010</dt>
- <dd>www.pc811.com</dd><dt>2011</dt>
- <dd>www.pc811.com</dd><dt>2012</dt>
- <dd>www.pc811.com</dd><dt>2013</dt>
- <dd>www.pc811.com</dd><dt>2014</dt>
- <dd>www.pc811.com</dd></dl>
- </div></div>
- </div>
- <style>.fl{float:left!important;_display:inline;}
- .main2{background-image:url(main1_lc.jpg);background-repeat:no-repeat;background-position:center;background-attachment:fixed;}.wrap{width:1000px;height:1830px;margin:0pxauto;overflow:hidden;line-height:24px;}
- .main2_of1{margin:200px000;}.main2_of2{margin:55px0020px;width:450px;border-left:#fff1pxsolid;color:#fff;position:relative;height:605px;}
- .main2_of2dl{position:absolute;left:-9px;top:-25px;}.main2_of2dt{background:url(main1_r.png)no-repeat;font:40018px/18px"宋体";color:#040404;font-size:18px;padding:010px025px;width:75px;text-align:center;}
- .main2_of2dd{width:345px;line-height:20px;}.main2_of2dd{float:left;margin:20px000;}
- </style><divclass="main2">
- <divclass="wrap"><h3><imgsrc="main2.png"></h3>
- <divclass="flmain2_of1"><imgsrc="main2_l.png"></div><divclass="flmain2_of2">
- <dl><dt>2004</dt>
- <dd>www.pc811.comwww.pc811.comwww.pc811.comwww.pc811.comwww.pc811.com</dd><dt>2005</dt>
- <dd>www.pc811.comwww.pc811.comwww.pc811.comwww.pc811.comwww.pc811.com。</dd><dt>2006</dt>
- <dd>www.pc811.comwww.pc811.comwww.pc811.comwww.pc811.com</dd><dt>2007</dt>
- <dd>www.pc811.com</dd><dt>2008</dt>
- <dd>www.pc811.com</dd><dt>2009</dt>
- <dd>www.pc811.com</dd><dt>2010</dt>
- <dd>www.pc811.com</dd><dt>2011</dt>
- <dd>www.pc811.com</dd><dt>2012</dt>
- <dd>www.pc811.com</dd><dt>2013</dt>
- <dd>www.pc811.com</dd><dt>2014</dt>
- <dd>www.pc811.com</dd></dl>
- </div></div>
- </div>
演示地址
上一篇:IPTV服务是什么
下一篇:Windows7系统优化常用技巧
-
给我们打电话
7*24小时服务热线:1399999999
全国客服热线:400-0000-000 -
百度地图
福建省三明市 -
给我们发邮件
E-mail:[email protected]
在线沟通