Authored by 毕凯

购物车 scss => css

.chose-panel {
position: fixed;
display: none;
height: 100%;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0,0,0,.3);
z-index:3;
.main {
position: absolute;
height: 610px;
bottom: 0;
left: 0;
right: 0;
background: #fff;
}
.infos {
height: 460px;
padding: 0 22px;
}
.chose-items {
height: 325px;
overflow: auto;
}
.basic-info {
overflow: hidden;
position: relative;
margin-bottom: 30px;
margin-top: 30px;
}
.thumb {
float: left;
width: 100px;
margin-right: 20px;
}
.text-info {
height: auto;
.name {
font-size: 28px;
height: 74px;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.price{
font-size: 24px;
display: inline;
}
.sale-price {
color: #e10;
margin-right: 15px;
&.no-price {
color: #000;
}
}
.market-price {
color: #b0b0b0;
text-decoration: line-through;
}
}
.color-list, .size-list, .num {
position: relative;
font-size: 28px;
padding-left: 80px;
input.disabled{
background-color:#fff;
color: #000;
opacity: 1;
border-radius: 0;
-webkit-appearance: none;
}
> span {
position: absolute;
left: 0;
top: 20px;
}
>span.left-num{
position: absolute;
left: 380px;
top: 20px;
}
span.disabled{
color: #e6e6e6;
}
}
.size-list li.hide {
display: none;
}
.block {
float: left;
display: block;
box-sizing: border-box;
padding: 0 20px;
min-width: 80px;
height: 80px;
border: 1px solid #000;
margin-right: 30px;
margin-bottom: 30px;
line-height: 80px;
text-align: center;
&.chosed {
border-color: #e10;
background: resolve('shopping-cart/right.png') no-repeat;
background-size: 38px;
background-position: bottom right;
color: #e10;
}
&.zero-stock {
color: #e0e0e0;
border-color: #e0e0e0;
}
&.zero-stock.chosed {
border-color: #e0e0e0;
background: none;
color: #e0e0e0;
background-color: #c0c0c0;
}
}
.num {
margin-bottom: 20px;
}
.num .btn {
float: left;
display: block;
height: 80px;
width: 80px;
text-align: center;
line-height: 80px;
border: 1px solid #e6e6e6;
&.disable {
color: #e6e6e6;
}
}
.good-num {
float: left;
width: 106px;
height: 80px;
line-height: 80px;
padding: 0;
border: 1px solid #e6e6e6;
text-align: center;
margin-left: -1px;
}
.btn-plus{
margin-left: -1px;
}
.btn-wrap {
position: relative;
height: 120px;
border-top: 1px solid #e6e6e6;
padding: 20px;
text-align: center;
background: #fff;
box-sizing: border-box;
.btn-sure {
width: 260px;
height: 80px;
background: #e10;
color: #fff;
font-size: 32px;
border: none;
}
}
}
... ...
.gift-advance-page {
.gift-advance-good {
position: relative;
padding: 20px 0;
margin-left: 34px;
height: 160px;
border-bottom: 1px solid #e0e0e0;
}
.advance-block:last-child .gift-advance-good:last-child {
border-bottom: 1px solid #e0e0e0;
}
.thumb-wrap {
position: relative;
float: left;
width: 120px;
height: 160px;
.thumb {
width: 100%;
height: 100%;
}
}
.tag {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 25px;
color: #fff;
text-align: center;
background: #eb76aa;
&:before {
content: '加价购';
display: block;
font-size: 12px;
line-height: 25px;
transform: scale(0.833);
}
}
.deps {
margin-left: 135px;
}
.gift-advance-good .name {
margin-bottom: 20px;
width: 440px;
font-size: 28px;
}
.row:nth-child(2) {
font-size: 22px;
height: 45px;
line-height: 45px;
> span {
margin-right: 15px;
}
}
.row:nth-child(3) {
position: relative;
}
.color, .size {
color: #b6b6b6;
}
.price {
font-size: 24px;
color: #f1545b;
&.market-price {
color: #999;
text-decoration: line-through;
}
}
.count {
font-size: 20px;
color: #999;
margin-left: 22px;
}
.chose {
position: absolute;
width: 88px;
height: 58px;
background: #f8f8f8;
border: 1px solid #ccc;
right: 20px;
top: 71px;
font-size: 26px;
line-height: 58px;
text-align: center;
}
.title {
width: 600px;
height: 60px;
line-height: 60px;
padding: 0 20px;
font-size: 24px;
background: #f8f8f8;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.gift-block .tag {
background: #a1ce4e;
&:before {
content: '赠品';
}
}
}
... ...
.shopping-cart-good {
$cartRed: #d0253b;
position: relative;
padding-left: 16px;
.prevent-img-click {
position: absolute;
width: 20px;
height: 200px;
background-color: transparent;
z-index: 99;
}
.checkbox {
position: absolute;
top: 50%;
margin-top: -34px;
margin-left: 8px;
font-size: 28px;
&.icon-cb-checked {
color: #000;
}
&.disabled {
color: #f0f0f0;
}
}
.few-tag {
width: 150px;
position: absolute;
text-align: center;
top: 72%;
color: #fff;
span {
display: inline-block;
transform: scale(0.833);
}
}
.gift-tag {
background-color: #88BE51;
}
.plus-tag {
background-color: #FC1264;
}
.few-tag-expire {
position: absolute;
top: 40%;
left: 20px;
background-color: #7f7f7f;
display: inline-block;
color: #fff;
border-radius: 12px;
padding: 4px;
font-size: 20px;
width: 48px;
text-align: center;
}
.info {
float: left;
margin-left: 60px;
padding: 16px 0;
padding-right: 20px;
}
.fixed-height {
height: 2.7rem;
}
.thumb {
float: left;
width: 150px;
background-size: 100%;
background-repeat: no-repeat;
}
.deps {
position: relative;
width: 380px;
margin-left: 180px;
border-bottom: 1px solid #e0e0e0;
padding: 0.5rem 0;
}
.name {
display: inline-block;
width: 80%;
color: #5a5a5a;
font-size: 0.6rem;
line-height: 0.7rem;
}
.color-size-row > span {
margin-right: 15px;
}
.color, .size {
font-size: 0.6rem;
color: #b6b6b6;
}
.appear-date {
float: left;
color: $cartRed;
display: block;
font-size: 0.5rem;
}
.price {
font-size: 0.6rem;
color: $cartRed;
display: inline;
.sale-price{
color: #b0b0b0;
text-decoration: line-through;
}
}
.count {
font-size: 20px;
color: #999;
display: inline-block;
width: 22%;
position: absolute;
text-align: center;
}
.low-stocks {
display: inline-block;
width: 100px;
height: 30px;
line-height: 30px;
font-size: 22px;
border: none;
color: #fff;
text-align: center;
float: right;
margin-right: 16px;
padding: 4px;
border-radius: 20px;
}
.low-stocks {
background: #7f7f7f;
}
.vip {
display: inline-block;
color: #fff;
background: #e01;
border-radius: 16px;
padding: 0 12px;
margin-left: 8px;
font-size: 20px;
}
.la-tag {
margin-top: 0.3rem;
min-height: 1rem;
}
.icon-del,
.icon-edit {
position: absolute;
color: #ccc;
font-size: 30px;
}
.icon-del {
right: 20px;
}
.icon-edit {
right: 72px;
}
.opt-panel {
position: absolute;
width: 220px;
right: 0;
top: 0;
bottom: 0;
color: #fff;
> div {
float: left;
box-sizing: border-box;
width: 110px;
height: 100%;
text-align: center;
padding: 40px 20px 0;
font-size: 15px;
}
span {
display: block;
}
.put-in-favorite {
background: #bbb;
}
.del {
background: #999;
.iconfont {
margin-bottom: 20px;
}
}
}
.calculate-num{
float: right;
.calculate{
float: right;
border:1px solid #b0b0b0;
border-radius:.2rem;
p{
color: #444;
&:first-child{
height: 60px;
border-bottom:1px solid #b0b0b0;
span {
border-left:1px solid #b0b0b0;
border-right:1px solid #b0b0b0;
}
}
i{
width: 72px;
height: 60px;
float: left;
line-height: 60px;
text-align: center;
}
span{
width: 96px;
height: 60px;
float: left;
font-size: 40px;
line-height: 60px;
text-align: center;
}
&:last-child {
span{
width: 168px;
overflow: hidden;
font-size: 36px;
text-overflow:ellipsis;
white-space:nowrap;
}
}
}
}
.price{
line-height: 60px;
font-size: 46px;
font-weight: bold;
}
.count {
position: absolute;
right: 20px;;
top: 20px;;
font-size: 46px;
}
}
}
.shopping-cart-good:last-child {
.deps {
border: none;
}
}
... ...
@import "good";
@import "chose-panel";
@import "gift-advance-good";
@import "order-ensure";
@import "select-coupon";
@import "select-address";
.icon-checkbox:before { content: "\e61c"; }
.icon-cb-checked:before { content: "\e61d"; }
.shopping-cart-page {
margin-bottom: 120px;
overflow-x: hidden;
background: #f0f0f0;
display: none;
.yoho-tip {
z-index: 4;
}
.cart-content > * {
background: #fff;
&:first-child {
border-top: none;
margin-top: 0;
}
}
.cart-nav {
color: #c6c6c6;
border-bottom: 1px solid #e0e0e0;
background: #fff;
li {
float: left;
width: 50%;
padding: 30px 0;
height: 30px;
}
li.active {
color: #000;
}
span {
display: block;
box-sizing: border-box;
width: 100%;
height: 30px;
line-height: 30px;
font-size: 30px;
text-align: center;
}
li:first-child span {
border-right: 1px solid #e0e0e0;
}
li:last-child {
position: relative;
}
.presell-tip {
position: absolute;
z-index: 1;
left: -2rem;
top: 1.75rem;
}
.triangle {
width: 0;
height: 0;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-bottom: 12px solid #000;
margin-left: 6rem;
}
.pt-content {
position: relative;
padding: 10px;
background: #000;
color: #fff;
font-size: 12px;
border-radius: 5px;
text-align: center;
width: 7rem;
}
}
.login-info {
height: 46px;
padding: 17px 20px;
color: #24acaa;
text-align: center;
font-size: 28px;
.btn {
display: inline-block;
background: #ed0010;
color: #fff;
width: 80px;
height: 46px;
line-height: 46px;
}
}
.presell-info {
height: 60px;
padding: 15px 30px;
font-size: 22px;
background: #f0f0f0;
color: #b7b7b7;
> span {
display: block;
}
.iconfont {
float: left;
font-size: 45px;
}
.txt {
height: 30px;
line-height: 30px;
margin-left: 80px;
}
}
.cart-goods {
border-bottom: 1px solid #e0e0e0;
margin-bottom: 0.75rem;
.shopping-cart-good:last-child .info {
border-bottom: none;
}
}
.invalid-goods {
border-top: 1px solid #e0e0e0;
border-bottom: 1px solid #e0e0e0;
margin: 0.75rem 0;
}
.freebie-and-advance-buy {
font-size: 24px;
border-top: 1px solid #e0e0e0;
border-bottom: 1px solid #e0e0e0;
margin-bottom: 30px;
> li {
box-sizing: border-box;
height: 80px;
line-height: 80px;
margin-bottom: 10px;
padding: 0 20px;
&:last-child {
margin-bottom: 0;
}
a {
float: right;
width: 100%;
}
.under-line {
display: inline-block;
height: 1px;
width: 91%;
position: absolute;
left: 9%;
background-color: #f1f1f1;
}
}
> li:first-child {
.under-line {
display: none;
}
}
.count {
color: #7b7b7b;
float: right;
}
.icon-right-arrow {
color: #8f8f8f;
float: right;
}
}
.activity-title{
border-top: 1px solid #e0e0e0;
font-size: 32px;
padding: 20px 20px 0;
}
.activity{
padding: 8px 20px 20px 32px;
font-size: 26px;
li:before {
content: "";
display: inline-block;
margin-right: 10px;
width: 8px;
height: 8px;
background-color: #000;
border-radius: 50%;
position: relative;
left: 0;
top: -.12rem;
}
}
.price-compute {
padding: 20px;
border-top: 1px solid #e0e0e0;
font-size: 28px;
.title {
display: inline-block;
width: 175px;
}
.minus {
float: right;
}
}
.balance {
position: fixed;
box-sizing: border-box;
bottom: 0;
width: 100%;
padding: 20px;
height: 120px;
border-top: 1px solid #e0e0e0;
background: #fff;
.iconfont {
position: absolute;
top: 50%;
margin-top: -14px;
font-size: 28px;
}
p {
float: right;
margin-right: 32px;
font-size: 26px;
span {
display: block;
height: 40px;
line-height: 40px;
color: #d0253b;
font-weight: bold;
}
.tip {
color: #666;
font-size: 22px;
text-align: right;
font-weight:normal;
}
}
.btn-balance {
float: right;
width: 140px;
height: 80px;
line-height: 80px;
text-align: center;
background: #e01;
color: #fff;
border: none;
font-size: 28px;
}
}
.cart-zero{
width: 100%;
height: auto;
padding-top:2rem;
padding-bottom:20%;
i{
font-size: 6em;
display: block;
margin: 0 auto;
text-align: center;
color: #505050;
}
p{
display: block;
text-align: center;
font-size: 1.2em;
color: #505050;
padding:.6rem 0;
}
a{
width: 27%;
height: 1.2rem;
overflow: hidden;
line-height: 1.2rem;
border:1px solid #505050;
border-radius:.2rem;
display: block;
margin: 0 auto;
text-align: center;
}
}
}
... ...
.order-ensure-page {
background: #f0f0f0;
.block {
background: #fff;
margin: 20px 0;
padding: 30px 20px;
border-top: 1px solid #e0e0e0;
border-bottom: 1px solid #e0e0e0;
}
.title {
font-size: 26px;
font-weight: bold;
}
.address-wrap {
display: block;
position: relative;
margin-top: 0;
border-top: none;
> .iconfont {
position: absolute;
color: #bcbcbc;
right: 20px;
top: 50%;
margin-top: -8px;
}
.infos {
font-weight: bold;
font-size: 24px;
padding-right: 55px;
}
.per-info {
float: right;
}
.address {
display: block;
margin-top: 20px;
color: #bcbcbc;
font-weight: normal;
}
}
.dispatch .title {
margin-bottom: 10px;
}
.dispatch .sub-block:first-child {
border-bottom: 1px solid #f7f7f7;
margin-bottom: 15px;
}
.dispatch-mode li,
.dispatch-time li {
float: left;
padding: 10px 20px;
margin-right: 15px;
margin-bottom: 15px;
border: 1px solid #c9c9c9;
color: #676767;
font-size: 26px;
&.chosed {
border-color: #000;
background: resolve('shopping-cart/black-right.png') no-repeat;
background-size: 30px;
background-position: bottom right;
}
}
.goods {
margin-right: -20px;
.price-wrap {
position: static;
text-align: left;
.price {
color: #444;
}
.count {
display: inline;
margin-left: 20px;
}
}
.name {
max-width: 400px;
}
}
.sale-invoice {
margin-top: -20px;
font-size: 24px;
li {
height: 90px;
line-height: 90px;
border-bottom: 1px solid #f7f7f7;
overflow: hidden;
a {
display: block;
}
}
.coupon-count {
padding: 5px 15px;
background: #f00;
color: #fff;
border-radius: 10px;
margin-left: 20px;
}
.coupon-use {
box-sizing: border-box;
position: relative;
float: right;
padding-right: 30px;
color: #999;
text-align: right;
width: 320px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
.iconfont {
position: absolute;
top:0;
right: 0;
color: #999;
}
}
.checkbox {
display: inline-block;
width: 80px;
text-align: center;
margin-right: -20px;
}
.coin-check {
float: right;
color: #999;
.checkbox {
margin-left: 5px;
color: #000;
}
&.used {
color: #f00;
}
em {
color: #f00;
}
}
.checkbox.icon-checkbox {
color: #ccc;
}
.invoice {
.checkbox {
float: right;
}
&.focus {
height: auto;
}
}
.desc {
color: #999;
}
}
.block {
input, textarea {
box-sizing: border-box;
margin: 20px 0;
padding: 0 12px;
width: 100%;
height: 72px;
color: #444;
background: #efefef;
font-size: 24px;
line-height: 1;
outline: 0;
border: 0;
border-radius: 4px;
}
textarea {
padding: 12px;
height: auto;
resize: none;
}
}
#invoice {
border-top: 1px solid #f7f7f7;
label {
display: block;
border-top: 1px solid #f7f7f7;
}
select {
position: relative;
float: right;
width: 40%;
height: 50px;
top: 20px;
border: 1px solid #f7f7f7;
}
}
#msg {
padding-top: 20px;
input {
margin: 0;
}
}
.total {
font-size: 22px;
margin-top: 20px;
span {
display: inline-block;
width: 130px;
}
}
.cost {
border-top: 1px solid #f7f7f7;
line-height: 100px;
margin-top: 10px;
font-size: 34px;
em {
color: #f00;
}
}
.pay-mode {
background: #fff;
padding: 0 20px;
margin-top: -22px;
li {
height: 88px;
line-height: 88px;
margin-bottom: 28px;
border-radius: 5px;
font-size: 32px;
color: #fff;
text-align: center;
background: #000;
}
.default {
background: #57b038;
}
.iconfont {
margin-right: 20px;
font-size: 32px;
}
}
}
... ...
.select-address-page {
padding-bottom: 20px;
.add-address {
margin-bottom: 0;
}
}
... ...
@define-extend line {
content: '';
position: absolute;
top: 50%;
border-top: 1px solid #b0b0b0;
width: 120px;
height: 0;
}
.select-coupon-page {
margin-top: 30px;
margin-bottom: 30px;
#new-coupon {
margin-bottom: 30px;
padding-left: 30px;
padding-right: 30px;
font-size: 24px;
input {
padding: 0 12px;
width: 384px;
height: 80px;
border: 1px solid #b0b0b0;
border-radius: .1rem;
outline: 0;
}
.submit {
margin-left: 30px;
width: 130px;
height: 80px;
color: #fff;
background: #b0b0b0;
border-radius: .1rem;
border: none;
outline: 0;
}
}
.coupon-list {
.employ-main:first-child {
margin-top: 0;
}
.employ-main:last-child {
margin-bottom: 0;
}
}
.not-use {
display: block;
width: 560px;
margin: 30px auto 0;
text-align: center;
font-size: 32px;
line-height: 2.5;
border: 1px solid #444;
border-radius: 4px;
}
.not-avaliable-coupon-line {
position: relative;
margin-top: 30px;
margin-bottom: 30px;
font-size: 28px;
line-height: 2;
color: #b0b0b0;
text-align: center;
&:before {
@extend line;
left: 60px;
}
&:after {
@extend line;
right: 60px;
}
}
.not-avaliable {
background-image: resolve('me/employ/employ-grey.jpg') !important;
}
}
... ...
... ... @@ -186,5 +186,4 @@ a {
@import "category/index";
@import "me/index";
@import "product/index";
/*
@import "cart/index";*/
@import "cart/index";
... ...