本人的手机购物网也想做一下像淘宝左下“淘”字的特效,比较方便的导航。用手机(iphone)访问 m.taobao.com可以看到用爬虫程序通过http协议发送IPHONE的user agent得到源程序,然后抽掉没用的程序得如下:
<!DOCTYPE html>
<html >
<head>  
 <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" /> 
 <meta content="yes" name="apple-mobile-web-app-capable" /> 
 <meta content="black" name="apple-mobile-web-app-status-bar-style" /> 
 <meta content="telephone=no" name="format-detection" /> 
 
 <link href="http://a.tbcdn.cn/mw/base/styles/component/taoplus/css/taoplus2.css?v=0" rel="stylesheet" type="text/css" /> 
 <link href="http://a.tbcdn.cn/mw/base/styles/component.css?v=2075723" rel="stylesheet" type="text/css" />  </head>
<form id="J_indexform" name="wapSearchForm"></form> 
<script src="http://a.tbcdn.cn/mw/base/libs/seajs/1.2.0/sea.js" ></script> 
<!-- 
<script src="http://127.0.0.1/mtaobao/sea2.js" ></script> 
-->
<script>
seajs.use("http://a.tbcdn.cn/mw/app/index/h5/js/index.js?v=0");
//seajs.use("http://127.0.0.1/mtaobao/index.js?v=0");
</script>  </div></body></html>
把以上页面,放到自己的服务器,然后用手机访问还是有特效。
css放到本地是可以的,但把js放到本地后特效就没了,是什么原因呢?百思不得其解。望有高人指点!(只有20分,奖励了,希望不要嫌少)

解决方案 »

  1.   

    当然有行了,你没看看http://a.tbcdn.cn/mw/app/index/h5/js/index.js的内容么,人家文件里面还引含了诸多文件(如/mw/base/styles/component/timelist/js/timelist.js,......)你放到你本地,那是想得太简单了。
      

  2.   

    当然不行了,你没看看http://a.tbcdn.cn/mw/app/index/h5/js/index.js的内容么,人家文件里面还引含了诸多文件(如/mw/base/styles/component/timelist/js/timelist.js,......)你放到你本地,那是想得太简单了。