@import "guang/clothes/*.png"; $clothes: sprite-map("guang/clothes/*.png"); @mixin retina-sprite($map, $sprite, $scale) { $width: image-width(sprite-file($map, $sprite)); $height: image-height(sprite-file($map, $sprite)); $offsetY: ceil(nth(sprite-position($map, $sprite), 2) / $scale); background: sprite-url($map) 0 $offsetY no-repeat; $zoomX: ceil(image_width(sprite-path($map)) / $scale); $zoomY: auto; @include background-size($zoomX $zoomY); display: block; } @mixin relatedTitle { margin: 0 29rem / $pxConvertRem; background: #fff; border: 1px solid #e0e0e0; border-bottom: none; line-height: 72rem / $pxConvertRem; font-size: 30rem / $pxConvertRem; color: #b0b0b0; text-align: center; } .guang-detail-page { #wrapper { background: #f0f0f0; } #wrapper.ios { position: absolute; top: 0; bottom: 0; left: 0; right: 0; overflow: hidden; &.has-head { top: 90rem / $pxConvertRem; + .fixed-top { top: 90rem / $pxConvertRem; } } } .author { border-bottom: 1px solid #e0e0e0; background: #fff; > a { display: block; height: 100%; } .avatar { float: left; margin-top: 20rem / $pxConvertRem; margin-left: 30rem / $pxConvertRem; width: 50rem / $pxConvertRem; height: 50rem / $pxConvertRem; @include border-radius(50%); } .name { float: left; font-size: 28rem / $pxConvertRem; color: #000; padding: 30rem / $pxConvertRem 0; margin-left: 30rem / $pxConvertRem; } .intro { float: left; font-size: 28rem / $pxConvertRem; color: #b0b0b0; padding: 30rem / $pxConvertRem 0; margin-left: 30rem / $pxConvertRem; } } .post-title { padding: 16rem / $pxConvertRem 0 26rem / $pxConvertRem 30rem / $pxConvertRem; background: #fff; .title { line-height: 60rem / $pxConvertRem; font-size: 40rem / $pxConvertRem; color: #000; font-weight: bold; } } .text-block { padding: 20rem / $pxConvertRem 30rem / $pxConvertRem; line-height: 46rem / $pxConvertRem; font-size: 28rem / $pxConvertRem; background: #fff; color: #444; } .big-img-block { padding-bottom: 5rem / $pxConvertRem; background: #fff; img { width: 100%; height: 640rem / $pxConvertRem; } } .small-img-block { padding-bottom: 8rem / $pxConvertRem; background: #fff; img { float: right; width: 315rem / $pxConvertRem; height: 420rem / $pxConvertRem; &:first-child { float: left; } } } .collocation-block { background: #fff; .good-list { padding-left:15rem / $pxConvertRem; } } .thumb-container { padding-top: 30rem / $pxConvertRem; padding-left: 20rem / $pxConvertRem; background: transparent image-url('guang/thumb-container-bg.png') no-repeat; background-size: 200% 100%; &.fixed-top { position: fixed; left: 0; right: 0; top: 0; } &.fixed-bottom { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.9); } &.absolute { position: absolute; left: 0; right: 0; } &.static { position: static; } &.hide { display: none; } } .clothe-type { position: absolute; right: 6rem / $pxConvertRem; bottom: 34rem / $pxConvertRem; width: 20px; height: 20px; @include border-radius(50%); &.bag { @include retina-sprite ($clothes, bag, 80/20); background-color: #fff; background-size: 100%; } &.cloth { @include retina-sprite ($clothes, cloth, 80/20); background-color: #fff; background-size: 100%; } &.dress { @include retina-sprite ($clothes, dress, 80/20); background-color: #fff; background-size: 100%; } &.headset { @include retina-sprite ($clothes, headset, 80/20); background-color: #fff; background-size: 100%; } &.lamp { @include retina-sprite ($clothes, lamp, 80/20); background-color: #fff; background-size: 100%; } &.pants { @include retina-sprite ($clothes, pants, 80/20); background-color: #fff; background-size: 100%; } &.shoe { @include retina-sprite ($clothes, shoe, 80/20); background-color: #fff; background-size: 100%; } &.swim-suit { @include retina-sprite ($clothes, swim-suit, 80/20); background-color: #fff; background-size: 100%; } &.under { @include retina-sprite ($clothes, under, 80/20); background-color: #fff; background-size: 100%; } &.watch { @include retina-sprite ($clothes, watch, 80/20); background-color: #fff; background-size: 100%; } } .thumb { display: inline-block; position: relative; margin-right: 22rem / $pxConvertRem; padding-bottom: 30rem / $pxConvertRem; &:last-child { margin-right: 0; } &.focus .thumb-img { border-color: #000; } } .thumb-img { height: 134rem / $pxConvertRem; width: 96rem / $pxConvertRem; border: 1px solid transparent; } .related-reco-block { background: #fff; padding-left: 15rem / $pxConvertRem; border-top: 1px solid #e0e0e0; h2 { margin-left: -15rem / $pxConvertRem; line-height: 104rem / $pxConvertRem; font-size: 30rem / $pxConvertRem; color: #b0b0b0; text-align: center; } .one-good { padding-left: 15rem / $pxConvertRem; padding-right: 30rem / $pxConvertRem; margin-bottom: 20rem / $pxConvertRem; .thumb { float: left; height: 134rem / $pxConvertRem; width: 96rem / $pxConvertRem; } .content-container { padding-left: 120rem / $pxConvertRem; height: 134rem / $pxConvertRem; line-height: 1; font-size: 24rem / $pxConvertRem; > p { height: 50%; line-height: 94rem / $pxConvertRem; } span { display: inline-block; line-height: 24rem / $pxConvertRem; } .price { line-height: 47rem / $pxConvertRem; } } .sale-price { color: #d62927; line-height: 1.5; } .sale-price.no-price { color: #000; } .market-price { margin-left: 5rem / $pxConvertRem; color: #b0b0b0; text-decoration: line-through; line-height: 1.5; } .check-detail { display: inline-block; color: #000; border: 1px solid; border-radius: 2px; float: right; padding: 0 5px; line-height: 1.5; } } } .related-brand { margin-top: 30rem / $pxConvertRem; h2 { @include relatedTitle; } .brand-list { border-top: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0; padding: 30rem / $pxConvertRem 0 30rem / $pxConvertRem; background: #fff; } .brand { float: left; width: 158rem / $pxConvertRem; height: 128rem / $pxConvertRem; border-right: 1px solid #e0e0e0; margin-bottom: 10rem / $pxConvertRem; a { display: block; } &:nth-child(4n) { border-right: none; } } .brand-logo { display: table-cell; width: 158rem / $pxConvertRem; height: 94rem / $pxConvertRem; vertical-align: middle; img { display: block; max-width: 158rem / $pxConvertRem; max-height: 94rem / $pxConvertRem; vertical-align: middle; margin: 0 auto; } } .brand-name { margin: 10rem / $pxConvertRem 0 0 0; line-height: 24rem / $pxConvertRem; font-size: 18rem / $pxConvertRem; color: #babac2; text-align: center; text-decoration: none; border-bottom: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } } .related-tag { position: relative; padding-bottom: 30rem / $pxConvertRem; border-bottom: 1px solid #e0e0e0; background: #fff; .tag-bg { position: absolute; height: 40rem / $pxConvertRem; width: 40rem / $pxConvertRem; background: image-url('guang/tag.png') no-repeat; background-size: 100% 100%; top: 35rem / $pxConvertRem; left: 20rem / $pxConvertRem; } .tag-list { margin-left: 50rem / $pxConvertRem; } li { float: left; margin-top: 31rem / $pxConvertRem; margin-left: 31rem / $pxConvertRem; } a { height: 50rem / $pxConvertRem; line-height: 50rem / $pxConvertRem; font-size: 30rem / $pxConvertRem; color: #000; text-decoration: underline; white-space: nowrap; } } .related-info { margin-top: 30rem / $pxConvertRem; h2 { @include relatedTitle; } .info-list { background: #fff; padding-bottom: 30rem / $pxConvertRem; border-top: 1px solid #e0e0e0; } li { padding-top: 30rem / $pxConvertRem; margin-bottom: 10rem / $pxConvertRem; a { display: block; } img { float: left; margin-left: 30rem / $pxConvertRem; width: 182rem / $pxConvertRem; height: 114rem / $pxConvertRem; &.square { height: 182rem / $pxConvertRem; } } } .title, .publish-time { float: left; width: 360rem / $pxConvertRem; margin-left: 30rem / $pxConvertRem; line-height: 40rem / $pxConvertRem; color: #444; font-size: 28rem / $pxConvertRem; } .publish-time { font-size: 18rem / $pxConvertRem; margin-top: 0; color: #b0b0b0; .iconfont { font-size: 18rem / $pxConvertRem; } } } }