Authored by unknown

侧栏导航新需求html css img

... ... @@ -2,7 +2,7 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
Created by FontForge 20120731 at Tue Jul 14 10:41:37 2015
Created by FontForge 20120731 at Sun Sep 6 17:15:18 2015
By Ads
</metadata>
<defs>
... ... @@ -19,7 +19,7 @@ Created by FontForge 20120731 at Tue Jul 14 10:41:37 2015
bbox="0 -224 5637 812"
underline-thickness="50"
underline-position="-100"
unicode-range="U+0078-E610"
unicode-range="U+0078-E614"
/>
<missing-glyph horiz-adv-x="374"
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
... ... @@ -92,5 +92,15 @@ d="M682 74q-108 -89 -249 -89q-53 0 -104.5 14.5t-94.5 39.5t-79.5 61.5t-61.5 79.5t
t-223 -93q-91 -93 -92 -222q0 -86 42 -158.5t115 -114.5t158 -42z" />
<glyph glyph-name="uniE610" unicode="&#xe610;"
d="M245 300l-9 9l472 472l80 -80l-400 -401l400 -401l-80 -80l-472 472z" />
<glyph glyph-name="uniE611" unicode="&#xe611;"
d="M509 780q-4 -2 -245 -245q-221 -224 -235 -245q-6 -9 -6 -15q0 -35 42 -33q7 0 233 227l225 228l226 -228q105 -106 167 -166.5t65 -60.5q21 -1 31.5 7.5t10.5 25.5q0 12 -32 46q-33 36 -206 212q-241 243 -246 246q-15 8 -30 1zM171 245q-12 -8 -14 -38.5t-2 -188
t2 -188t14 -38.5q7 -6 352.5 -6t352.5 6q11 8 13 36q2 30 2 190q0 158 -2 188.5t-13 38.5q-8 7 -21.5 5.5t-21.5 -10.5l-10 -9v-381h-600v381l-10 9q-15 16 -36 9q-4 -2 -6 -4zM398 202l-11 -12v-215l11 -12q6 -8 11 -10.5t14 -2.5q16 0 26 13l10 12v175h128v-175l11 -12
q7 -9 16 -12t18.5 0t16.5 12l10 12v215l-20 24h-231z" />
<glyph glyph-name="uniE612" unicode="&#xe612;"
d="M951 -7h-878l439 614z" />
<glyph glyph-name="uniE613" unicode="&#xe613;"
d="M512 -7l-439 614h878z" />
<glyph glyph-name="uniE614" unicode="&#xe614;"
d="M313 -49l349 349l-349 349q-7 7 -7 16.5t6.5 16t16 6.5t16.5 -6l345 -345q16 -15 21 -20q7 -7 7 -17t-7 -17q-4 -4 -25.5 -25t-22.5 -22l-318 -318q-7 -6 -16.5 -6t-16 6.5t-6.5 16t7 16.5z" />
</font>
</defs></svg>
... ...
No preview for this file type
... ... @@ -13,6 +13,20 @@
<ul class="icon_lists clear">
<li>
<i class="icon iconfont">&#xe612;</i>
<div class="name">三角2</div>
<div class="code">&amp;#xe612;</div>
<div class="fontclass">.sanjiao2</div>
</li>
<li>
<i class="icon iconfont">&#xe613;</i>
<div class="name">三角1</div>
<div class="code">&amp;#xe613;</div>
<div class="fontclass">.sanjiao1</div>
</li>
<li>
<i class="icon iconfont">&#xe600;</i>
<div class="name">share</div>
<div class="code">&amp;#xe600;</div>
... ... @@ -90,6 +104,13 @@
</li>
<li>
<i class="icon iconfont">&#xe614;</i>
<div class="name">前进</div>
<div class="code">&amp;#xe614;</div>
<div class="fontclass">.qianjin</div>
</li>
<li>
<i class="icon iconfont">&#xe610;</i>
<div class="name">back</div>
<div class="code">&amp;#xe610;</div>
... ... @@ -104,6 +125,13 @@
</li>
<li>
<i class="icon iconfont">&#xe611;</i>
<div class="name">home</div>
<div class="code">&amp;#xe611;</div>
<div class="fontclass">.home</div>
</li>
<li>
<i class="icon iconfont">&#xe60b;</i>
<div class="name">menu-btn</div>
<div class="code">&amp;#xe60b;</div>
... ...
... ... @@ -15,6 +15,8 @@
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.icon-sanjiao2:before { content: "\e612"; }
.icon-sanjiao1:before { content: "\e613"; }
.icon-yoho-share:before { content: "\e600"; }
.icon-yoho-good:before { content: "\e601"; }
.icon-yoho-view:before { content: "\e602"; }
... ... @@ -26,8 +28,10 @@
.icon-up:before { content: "\e608"; }
.icon-downn:before { content: "\e609"; }
.icon-gou:before { content: "\e60a"; }
.icon-qianjin:before { content: "\e614"; }
.icon-back:before { content: "\e610"; }
.icon-search:before { content: "\e60f"; }
.icon-home:before { content: "\e611"; }
.icon-icon1:before { content: "\e60b"; }
.icon-point1:before { content: "\e60c"; }
.icon-logo2:before { content: "\e60d"; }
... ...
... ... @@ -2,7 +2,7 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
Created by FontForge 20120731 at Tue Jul 14 10:41:37 2015
Created by FontForge 20120731 at Sun Sep 6 17:15:18 2015
By Ads
</metadata>
<defs>
... ... @@ -19,7 +19,7 @@ Created by FontForge 20120731 at Tue Jul 14 10:41:37 2015
bbox="0 -224 5637 812"
underline-thickness="50"
underline-position="-100"
unicode-range="U+0078-E610"
unicode-range="U+0078-E614"
/>
<missing-glyph horiz-adv-x="374"
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
... ... @@ -92,5 +92,15 @@ d="M682 74q-108 -89 -249 -89q-53 0 -104.5 14.5t-94.5 39.5t-79.5 61.5t-61.5 79.5t
t-223 -93q-91 -93 -92 -222q0 -86 42 -158.5t115 -114.5t158 -42z" />
<glyph glyph-name="uniE610" unicode="&#xe610;"
d="M245 300l-9 9l472 472l80 -80l-400 -401l400 -401l-80 -80l-472 472z" />
<glyph glyph-name="uniE611" unicode="&#xe611;"
d="M509 780q-4 -2 -245 -245q-221 -224 -235 -245q-6 -9 -6 -15q0 -35 42 -33q7 0 233 227l225 228l226 -228q105 -106 167 -166.5t65 -60.5q21 -1 31.5 7.5t10.5 25.5q0 12 -32 46q-33 36 -206 212q-241 243 -246 246q-15 8 -30 1zM171 245q-12 -8 -14 -38.5t-2 -188
t2 -188t14 -38.5q7 -6 352.5 -6t352.5 6q11 8 13 36q2 30 2 190q0 158 -2 188.5t-13 38.5q-8 7 -21.5 5.5t-21.5 -10.5l-10 -9v-381h-600v381l-10 9q-15 16 -36 9q-4 -2 -6 -4zM398 202l-11 -12v-215l11 -12q6 -8 11 -10.5t14 -2.5q16 0 26 13l10 12v175h128v-175l11 -12
q7 -9 16 -12t18.5 0t16.5 12l10 12v215l-20 24h-231z" />
<glyph glyph-name="uniE612" unicode="&#xe612;"
d="M951 -7h-878l439 614z" />
<glyph glyph-name="uniE613" unicode="&#xe613;"
d="M512 -7l-439 614h878z" />
<glyph glyph-name="uniE614" unicode="&#xe614;"
d="M313 -49l349 349l-349 349q-7 7 -7 16.5t6.5 16t16 6.5t16.5 -6l345 -345q16 -15 21 -20q7 -7 7 -17t-7 -17q-4 -4 -25.5 -25t-22.5 -22l-318 -318q-7 -6 -16.5 -6t-16 6.5t-6.5 16t7 16.5z" />
</font>
</defs></svg>
... ...
... ... @@ -12,51 +12,51 @@ module.exports = {
searchUrl: 'http://www.yohoboys.com',
sideNav: [{
textCn: '男生',
textEn: 'Boys',
url: false,
current: true,
subNav: {
list: [{
textCn: '男生',
textEn: 'Boys',
img: '',
url: false
}, {
textCn: '首页',
img: 'http://res.yohoboys.com/res/new/boys/images/about/thirdbtn-sina.png',
url: ''
}, {
textCn: '新品到着',
img: '',
url: ''
}]
}
textEn: 'BOYS',
styleClass: 'boys',
url: ''
}, {
textCn: '女生',
textEn: 'Girls',
url: false,
textEn: 'GIRLS',
styleClass: 'girls',
url: ''
}, {
textCn: '潮童',
textEn: 'KIDS',
styleClass: 'kids',
url: ''
}, {
textCn: '创意生活',
textEn: 'LIFE STYLE',
styleClass: 'life',
url: ''
}, {
textCn: '新品节',
textEn: 'NEW',
styleClass: 'new',
url: ''
}, {
textCn: '逛',
textEn: 'TRENDFINDER',
styleClass: 'guang',
subNav: {
list: [{
textCn: '女生',
textEn: 'Girls',
img: '',
url: false
textCn: '逛',
textEn: 'TrendFinder',
back: true
}, {
textCn: '首页',
img: '',
textCn: '查看全部',
url: ''
}, {
textCn: '新品到着',
img: '',
textCn: '只看男生',
textEn: 'Boys',
url: ''
}, {
textCn: '只看女生',
textEn: 'Girls',
url: ''
}]
}
}, {
textCn: '潮童',
textEn: 'Kids'
}, {
textCn: '家居',
textEn: 'Life Style'
}],
content: [{
bannerTop: {
... ...
... ... @@ -5,45 +5,87 @@
right: 100rem / $pxConvertRem;
bottom: 0;
left: 0;
padding: 0 (30rem / $pxConvertRem);
z-index: 1;
ul{
background: #f0f0f0;
}
li {
position: relative;
height: 110rem / $pxConvertRem;
line-height: 110rem / $pxConvertRem;
height: 128rem / $pxConvertRem;
line-height: 128rem / $pxConvertRem;
border-bottom: 1px solid #e0e0e0;
background: #fff;
a {
display: block;
height: 100%;
padding-left: 48rem / $pxConvertRem;
padding-left: 110rem / $pxConvertRem;
color: #444;
font-size: 34rem / $pxConvertRem;
border-bottom: 1px solid #e0e0e0;
font-size: 24rem / $pxConvertRem;
}
.nav-point {
.nav-icon,.nav-img{
position: absolute;
left: 0;
color: #f0f0f0;
font-size: 18rem / $pxConvertRem;
height: 100%;
width: 60rem / $pxConvertRem;
height: 60rem / $pxConvertRem;
top: 50%;
margin-top: -30rem / $pxConvertRem;
left: 24rem / $pxConvertRem;
}
.enter-btn {
.enter-subnav {
position: absolute;
right: 0;
right: 30rem/ $pxConvertRem;
top: 0;
bottom: 0;
font-size: 32rem / $pxConvertRem;
color: #b2b2b2;
font-size: 36rem / $pxConvertRem;
color: #b0b0b0;
font-weight: lighter;
}
em {
margin-right: 20rem / $pxConvertRem;
margin-right: 10rem / $pxConvertRem;
font-weight: bold;
font-size: 34rem / $pxConvertRem;
}
}
li.current {
.nav-point {
color: #444;
li.boys{
i{
background: image-url('side-nav/boys.png') no-repeat left center;
background-size: 100% 100%;
}
}
li.girls{
i{
background: image-url('side-nav/girls.png') no-repeat left center;
background-size: 100% 100%;
}
}
li.kids{
i{
background: image-url('side-nav/kids.png') no-repeat left center;
background-size: 100% 100%;
}
}
li.life{
i{
background: image-url('side-nav/life.png') no-repeat left center;
background-size: 100% 100%;
}
}
li.new{
margin: 19rem / $pxConvertRem 0 0;
border-top: 1px solid #e0e0e0;
a{
}
i{
background: image-url('side-nav/new.png') no-repeat left center;
background-size: 100% 100%;
}
}
li.guang{
i{
background: image-url('side-nav/guang.png') no-repeat left center;
background-size: 100% 100%;
}
}
}
... ... @@ -53,18 +95,24 @@
right: 100rem / $pxConvertRem;
left: 0;
bottom: 0;
background: #fff;
background: #fff !important;
z-index: 2;
transform: translate3d(100%, 0, 0);
transition: transform .3s ease-out;
li {
height: 109rem / $pxConvertRem;
line-height: 109rem / $pxConvertRem;
border: none;
a {
position: relative;
display: flex;
display: -webkit-flex;
margin: 0 (30rem / $pxConvertRem) 0 (112rem / $pxConvertRem);
padding-left: 0;
margin: 0 0 0 (30rem / $pxConvertRem);
padding-left: 50rem / $pxConvertRem;
border-bottom: 1px solid #e0e0e0;
align-items: center;
font-size: 36rem / $pxConvertRem;
z-index: 2;
}
/* img{
position: absolute;
... ... @@ -75,23 +123,34 @@
margin-top: -25rem / $pxConvertRem;
border: none;
} */
img {
max-width: 50rem / $pxConvertRem;
max-height: 50rem / $pxConvertRem;
margin-left: -70rem / $pxConvertRem;
margin-right: 16rem / $pxConvertRem;
.nav-point{
position: absolute;
left: 0rem / $pxConvertRem;
font-size: 16rem / $pxConvertRem;
color: #f0f0f0;
}
em {
font-weight: normal;
font-size: 36rem / $pxConvertRem;
}
}
li:hover{
.nav-point{
color: #3e3e3e;
}
}
li:first-child {
height: 80rem / $pxConvertRem;
line-height: 80rem / $pxConvertRem;
height: 88rem / $pxConvertRem;
line-height: 88rem / $pxConvertRem;
background: #3e3e3e;
a {
color: #fff;
border-bottom: none;
padding-left: 110rem / $pxConvertRem;
}
.nav-back{
position: absolute;
left: 0;
}
}
}
... ...
<div class="side-nav">
<ul>
{{# sideNav}}
<li {{# current}}class="current"{{/ current}}>
<li class="{{styleClass}}">
{{# url}}
<a href="{{.}}">
{{/ url}}
{{^ url}}
<a href="javascript:;">
{{/ url}}
<span class="nav-point iconfont">&#xe60c;</span>
{{# img}}
<img class="nav-img" src="{{.}}" alt="">
{{/ img}}
{{^ img}}
<i class="nav-icon"></i>
{{/ img}}
<em>{{textCn}}</em>{{textEn}}
<span class="enter-btn iconfont">&#xe604;</span>
{{# subNav}}
<span class="enter-subnav iconfont">&#xe614;</span>
{{/ subNav}}
</a>
{{# subNav}}
<ul class="sub-nav">
... ... @@ -22,8 +29,14 @@
{{^ url}}
<a href="javascript:;">
{{/ url}}
<img src="{{img}}" alt="">
<em>{{textCn}}</em>{{textEn}}
{{^ back}}
<span class="nav-point iconfont">&#xe60c;</span>
{{/ back}}
{{# back}}
<i class="nav-back iconfont">&#xe610;</i>
{{/ back}}
<em>{{textCn}}</em>
{{textEn}}
</a>
</li>
{{/ list}}
... ...