Authored by xuqi

static img in html -> css use

1 var $ = require('yoho.zepto'), 1 var $ = require('yoho.zepto'),
2 Swiper = require('yoho.iswiper'), 2 Swiper = require('yoho.iswiper'),
3 - lazyLoad = require('yoho.lazyload'); 3 + lazyLoad = require('yoho.zeptolazyload');
4 4
5 var $curNav, 5 var $curNav,
6 $navList = $('#discount-nav'), 6 $navList = $('#discount-nav'),
@@ -17,11 +17,14 @@ body.passport-body { @@ -17,11 +17,14 @@ body.passport-body {
17 margin: 20px 0 30px; 17 margin: 20px 0 30px;
18 18
19 .go-back { 19 .go-back {
  20 + display: block;
20 position: absolute; 21 position: absolute;
21 height: 30px; 22 height: 30px;
22 width: 30px; 23 width: 30px;
23 top: 5px; 24 top: 5px;
24 left: 0; 25 left: 0;
  26 + background: image-url('passport/go-back.png') no-repeat;
  27 + background-size: 100% 100%;
25 } 28 }
26 29
27 .title { 30 .title {
@@ -33,6 +36,9 @@ body.passport-body { @@ -33,6 +36,9 @@ body.passport-body {
33 .img-header { 36 .img-header {
34 width: 68px; 37 width: 68px;
35 height: 40px; 38 height: 40px;
  39 + background: image-url('passport/yoho-family.png') no-repeat;
  40 + background-size: 100% 100%;
  41 + margin: 0 auto;
36 } 42 }
37 } 43 }
38 44
@@ -22,15 +22,15 @@ @@ -22,15 +22,15 @@
22 }()); 22 }());
23 })(document, window); 23 })(document, window);
24 </script> 24 </script>
25 -{{#if rlsEnv}}  
26 - <link rel="stylesheet" href="http://cdn.yoho.cn/myohobuy/{{version}}/index.css">  
27 -{{/if}}  
28 -{{#if testEnv}}  
29 - <link rel="stylesheet" href="http://static.wap.yohobuy.com/css/index.css">  
30 -{{/if}}  
31 -{{#if devEnv}}  
32 - <link rel="stylesheet" href="http://static.dev.yohobuy.com/css/index.css">  
33 -{{/if}} 25 + {{#if rlsEnv}}
  26 + <link rel="stylesheet" href="http://cdn.yoho.cn/myohobuy/{{version}}/index.css">
  27 + {{/if}}
  28 + {{#if testEnv}}
  29 + <link rel="stylesheet" href="http://static.wap.yohobuy.com/css/index.css">
  30 + {{/if}}
  31 + {{#if devEnv}}
  32 + <link rel="stylesheet" href="http://static.dev.yohobuy.com/css/index.css">
  33 + {{/if}}
34 </head> 34 </head>
35 <body {{#if isPassportPage}}class=passport-body{{/if}}> 35 <body {{#if isPassportPage}}class=passport-body{{/if}}>
36 {{> layout/page_header}} 36 {{> layout/page_header}}
1 <div class="header"> 1 <div class="header">
2 {{#backUrl}} 2 {{#backUrl}}
3 - <a class="go-back" href={{.}}>  
4 - <img src="http://static.dev.yohobuy.com/img/passport/go-back.png">  
5 - </a> 3 + <a class="go-back" href={{.}}></a>
6 {{/backUrl}} 4 {{/backUrl}}
7 {{#showHeaderImg}} 5 {{#showHeaderImg}}
8 - <img class="img-header" src="http://static.dev.yohobuy.com/img/passport/yoho-family.png"> 6 + <div class="img-header"></div>
9 {{/showHeaderImg}} 7 {{/showHeaderImg}}
10 {{#headerText}} 8 {{#headerText}}
11 <p class="title">{{.}}</p> 9 <p class="title">{{.}}</p>