这不是采用CSS做的,开始我以为用了什么特殊手段做的,ff & ie6都一样,原来好不简单,算一算颜色怎么平均在两种颜色就可以了,当然还要逐级元素设置颜色,颜色是另外计算好的。使用该技术无论什么浏览器都不会有兼容性的问题,比较“硬”的方法实现一种特效 。截图如下:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>inforsphere</title> <mce:style type="text/css"><!-- .url1 { color: #000000 !important; } .url2 { color: #0a0a0a !important; } .url3 { color: #151515 !important; } .url4 { color: #1f1f1f !important; } .url5 { color: #2a2a2a !important; } .url6 { color: #353535 !important; } .url7 { color: #3f3f3f !important; } .url8 { color: #4a4a4a !important; } .url9 { color: #555555 !important; } .url10 { color: #5f5f5f !important; } .url11 { color: #6a6a6a !important; } .url12 { color: #757575 !important; } .url13 { color: #7f7f7f !important; } .url14 { color: #8a8a8a !important; } .url15 { color: #959595 !important; } .url16 { color: #9f9f9f !important; } .url17 { color: #aaaaaa !important; } .url18 { color: #b5b5b5 !important; } .url19 { color: #bfbfbf !important; } .url20 { color: #cacaca !important; } .url21 { color: #d5d5d5 !important; } .url22 { color: #dfdfdf !important; } .url23 { color: #eaeaea !important; } .url24 { color: #f5f5f5 !important; } .url25 { color: #ffffff !important; } --></mce:style><style type="text/css" mce_bogus="1"> .url1 { color: #000000 !important; } .url2 { color: #0a0a0a !important; } .url3 { color: #151515 !important; } .url4 { color: #1f1f1f !important; } .url5 { color: #2a2a2a !important; } .url6 { color: #353535 !important; } .url7 { color: #3f3f3f !important; } .url8 { color: #4a4a4a !important; } .url9 { color: #555555 !important; } .url10 { color: #5f5f5f !important; } .url11 { color: #6a6a6a !important; } .url12 { color: #757575 !important; } .url13 { color: #7f7f7f !important; } .url14 { color: #8a8a8a !important; } .url15 { color: #959595 !important; } .url16 { color: #9f9f9f !important; } .url17 { color: #aaaaaa !important; } .url18 { color: #b5b5b5 !important; } .url19 { color: #bfbfbf !important; } .url20 { color: #cacaca !important; } .url21 { color: #d5d5d5 !important; } .url22 { color: #dfdfdf !important; } .url23 { color: #eaeaea !important; } .url24 { color: #f5f5f5 !important; } .url25 { color: #ffffff !important; } </style> </head> <body> <div id="recent_entries"> <div class="url_container"> <span class="url"><a class="url1" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/developer.android.com/sdk/download.html?v=android-sdk-windows-1.5_r2.zip" mce_href="http://inforsphere.appspot.com/developer.android.com/sdk/download.html?v=android-sdk-windows-1.5_r2.zip"> developer.android.com/sdk/download.html?v=android-...</a></span> <span class="info url1"> 20 hours, 16 minutes ago</span> </div> <div class="url_container"> <span class="url"><a class="url2" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/www.aos.url.tw/viewtopic.php?f=8&t=2180&sid=88910081fb2917d71774e76fee3643eb" mce_href="http://inforsphere.appspot.com/www.aos.url.tw/viewtopic.php?f=8&t=2180&sid=88910081fb2917d71774e76fee3643eb"> www.aos.url.tw/viewtopic.php?f=8&t=2180&sid=889100...</a></span> <span class="info url2"> 22 hours, 30 minutes ago</span> </div> <div class="url_container"> <span class="url"><a class="url3" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/docs.djangoproject.com/en/dev/topics/db/aggregation/" mce_href="http://inforsphere.appspot.com/docs.djangoproject.com/en/dev/topics/db/aggregation/"> docs.djangoproject.com/en/dev/topics/db/aggregatio...</a></span> <span class="info url3"> 1 day, 1 hour ago</span> </div> <div class="url_container"> <span class="url"><a class="url4" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/www.youtube.com" mce_href="http://inforsphere.appspot.com/www.youtube.com"> www.youtube.com</a></span> <span class="info url4">5 days, 19 hours ago</span> </div> <div class="url_container"> <span class="url"><a class="url5" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/www.djangobook.com/en/beta/chapter06/" mce_href="http://inforsphere.appspot.com/www.djangobook.com/en/beta/chapter06/"> www.djangobook.com/en/beta/chapter06/</a></span> <span class="info url5">1 week ago</span> </div> <div class="url_container"> <span class="url"><a class="url6" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/www.ps3cluster.org/index.html" mce_href="http://inforsphere.appspot.com/www.ps3cluster.org/index.html"> www.ps3cluster.org/index.html</a></span> <span class="info url6">1 week ago</span> </div> <div class="url_container"> <span class="url"><a class="url7" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/developer.android.com/sdk/1.5_r3/index.html" mce_href="http://inforsphere.appspot.com/developer.android.com/sdk/1.5_r3/index.html"> developer.android.com/sdk/1.5_r3/index.html</a></span> <span class="info url7">1 week, 1 day ago</span> </div> <div class="url_container"> <span class="url"><a class="url8" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/youtube.com/" mce_href="http://inforsphere.appspot.com/youtube.com/"> youtube.com/</a></span> <span class="info url8">1 week, 2 days ago</span> </div> <div class="url_container"> <span class="url"><a class="url9" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/venusnote.cn" mce_href="http://inforsphere.appspot.com/venusnote.cn"> venusnote.cn</a></span> <span class="info url9">1 week, 3 days ago</span> </div> <div class="url_container"> <span class="url"><a class="url10" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/venusll.spaces.live.com/" mce_href="http://inforsphere.appspot.com/venusll.spaces.live.com/"> venusll.spaces.live.com/</a></span> <span class="info url10">1 week, 3 days ago</span> </div> <div class="url_container"> <span class="url"><a class="url11" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/nlsxy.com/" mce_href="http://inforsphere.appspot.com/nlsxy.com/"> nlsxy.com/</a></span> <span class="info url11">1 week, 3 days ago</span> </div> <div class="url_container"> <span class="url"><a class="url12" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/nlsxy.com/%27" mce_href="http://inforsphere.appspot.com/nlsxy.com/%27"> nlsxy.com/%27</a></span> <span class="info url12">1 week, 3 days ago</span> </div> <div class="url_container"> <span class="url"><a class="url13" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/img.cnbeta.com/newsimg/090830/11004701068940899.jpg" mce_href="http://inforsphere.appspot.com/img.cnbeta.com/newsimg/090830/11004701068940899.jpg"> img.cnbeta.com/newsimg/090830/11004701068940899.jp...</a></span> <span class="info url13"> 1 week, 4 days ago</span> </div> <div class="url_container"> <span class="url"><a class="url14" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/trac.osgeo.org/gdal/ticket/3116" mce_href="http://inforsphere.appspot.com/trac.osgeo.org/gdal/ticket/3116"> trac.osgeo.org/gdal/ticket/3116</a></span> <span class="info url14">1 week, 4 days ago</span> </div> <div class="url_container"> <span class="url"><a class="url15" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/view.booksky.org/ViewBook.aspx?SiteID=50&BookID=1050804&ChapterID=15481854" mce_href="http://inforsphere.appspot.com/view.booksky.org/ViewBook.aspx?SiteID=50&BookID=1050804&ChapterID=15481854"> view.booksky.org/ViewBook.aspx?SiteID=50&BookID=10...</a></span> <span class="info url15"> 1 week, 4 days ago</span> </div> <div class="url_container"> <span class="url"><a class="url16" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/booksky.org/BookDetail.aspx?BookID=1050804" mce_href="http://inforsphere.appspot.com/booksky.org/BookDetail.aspx?BookID=1050804"> booksky.org/BookDetail.aspx?BookID=1050804</a></span> <span class="info url16">1 week, 4 days ago</span> </div> <div class="url_container"> <span class="url"><a class="url17" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/blog.csdn.net/noaighost/archive/2009/04/26/4127131.aspx%26ei%3DIY2aSpjJN5T6kAWI2cWrAg%26sa%3DX%26oi%3Dspellmeleon_result%26resnum%3D1%26ct%3Dresult%26usg%3DAFQjCNEgNLahepGizB3V3L36eR18CqJeNQ" mce_href="http://inforsphere.appspot.com/blog.csdn.net/noaighost/archive/2009/04/26/4127131.aspx%26ei%3DIY2aSpjJN5T6kAWI2cWrAg%26sa%3DX%26oi%3Dspellmeleon_result%26resnum%3D1%26ct%3Dresult%26usg%3DAFQjCNEgNLahepGizB3V3L36eR18CqJeNQ"> blog.csdn.net/noaighost/archive/2009/04/26/4127131...</a></span> <span class="info url17"> 1 week, 4 days ago</span> </div> <div class="url_container"> <span class="url"><a class="url18" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/billkatz.com/2009/2/Remote-API-Hello-World" mce_href="http://inforsphere.appspot.com/billkatz.com/2009/2/Remote-API-Hello-World"> billkatz.com/2009/2/Remote-API-Hello-World</a></span> <span class="info url18">1 week, 5 days ago</span> </div> <div class="url_container"> <span class="url"><a class="url19" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/notebk.gofreeserve.com" mce_href="http://inforsphere.appspot.com/notebk.gofreeserve.com"> notebk.gofreeserve.com</a></span> <span class="info url19">1 week, 5 days ago</span> </div> <div class="url_container"> <span class="url"><a class="url20" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/salford-systems.com/cart.php" mce_href="http://inforsphere.appspot.com/salford-systems.com/cart.php"> salford-systems.com/cart.php</a></span> <span class="info url20">1 week, 5 days ago</span> </div> <div class="url_container"> <span class="url"><a class="url21" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/salford-systems.com/" mce_href="http://inforsphere.appspot.com/salford-systems.com/"> salford-systems.com/</a></span> <span class="info url21">1 week, 5 days ago</span> </div> <div class="url_container"> <span class="url"><a class="url22" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/ecognition.cc/downCont.asp?id=35" mce_href="http://inforsphere.appspot.com/ecognition.cc/downCont.asp?id=35"> ecognition.cc/downCont.asp?id=35</a></span> <span class="info url22">1 week, 5 days ago</span> </div> <div class="url_container"> <span class="url"><a class="url23" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/view.booksky.org/ViewBook.aspx?SiteID=50&BookID=1050804&ChapterID=15456980" mce_href="http://inforsphere.appspot.com/view.booksky.org/ViewBook.aspx?SiteID=50&BookID=1050804&ChapterID=15456980"> view.booksky.org/ViewBook.aspx?SiteID=50&BookID=10...</a></span> <span class="info url23"> 1 week, 5 days ago</span> </div> <div class="url_container"> <span class="url"><a class="url24" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/view.booksky.org/ViewBook.aspx?SiteID=50&BookID=1050804&ChapterID=15454882" mce_href="http://inforsphere.appspot.com/view.booksky.org/ViewBook.aspx?SiteID=50&BookID=1050804&ChapterID=15454882"> view.booksky.org/ViewBook.aspx?SiteID=50&BookID=10...</a></span> <span class="info url24"> 1 week, 5 days ago</span> </div> <div class="url_container"> <span class="url"><a class="url25" rel="gb_page_fs[]" href="http://inforsphere.appspot.com/view.booksky.org/ViewBook.aspx?SiteID=50&BookID=1050804&ChapterID=15430096" mce_href="http://inforsphere.appspot.com/view.booksky.org/ViewBook.aspx?SiteID=50&BookID=1050804&ChapterID=15430096"> view.booksky.org/ViewBook.aspx?SiteID=50&BookID=10...</a></span> <span class="info url25"> 1 week, 6 days ago</span> </div> </div> </body> </html>
代码由采风而来,感谢佚名网友提供的特效!