Commit 7f5b6fa4 by wd

修改促销标签位置和统一样式位置

parent 9b7a8ae0
...@@ -41,45 +41,8 @@ $schema = ($block->getZone() == 'item_view') ? true : false; ...@@ -41,45 +41,8 @@ $schema = ($block->getZone() == 'item_view') ? true : false;
$seller = number_format((1 - number_format($finalPriceModel->getAmount()->getValue() / $priceModel->getAmount()->getValue(),2)) *100,0) ?> $seller = number_format((1 - number_format($finalPriceModel->getAmount()->getValue() / $priceModel->getAmount()->getValue(),2)) *100,0) ?>
<?php if (!$block->isProductList()) :?> <?php if (!$block->isProductList()) :?>
<span class="product-info-promotion-span">- <?=$seller?>%</span> <span class="product-info-promotion-span">- <?=$seller?>%</span>
<style>
.product-info-promotion-span{
background-color: #ee0000;
height: 20px;
color: #ffffff;
font-size: 16px;
font-weight: 600;
margin-left: 10px;
padding: 2px 12px;
}
@media (max-width: 768px) {
.product-info-promotion-span{
font-size: 12px;
font-weight: bold;
}
}
</style>
<?php else :?> <?php else :?>
<span class="product-list-promotion-span">- <?=$seller?>%</span> <span class="product-list-promotion-span">- <?=$seller?>%</span>
<style>
.product-list-promotion-span{
position: absolute;
left: 15px;
top: 15px;
z-index: 1;
color: #ffffff;
background-color: #ee0000;
font-size: 16px;
font-weight: 600;
padding: 0 10px;
}
@media (max-width: 768px) {
.product-list-promotion-span{
font-size: 12px;
font-weight: bold;
}
}
</style>
<?php endif; ?> <?php endif; ?>
<?php else :?> <?php else :?>
......
...@@ -36,25 +36,6 @@ $schema = ($block->getZone() == 'item_view') ? true : false; ...@@ -36,25 +36,6 @@ $schema = ($block->getZone() == 'item_view') ? true : false;
<?php <?php
$seller = number_format((1 - number_format($finalPriceModel->getAmount()->getValue() / $priceModel->getAmount()->getValue(),2)) *100,0) ?> $seller = number_format((1 - number_format($finalPriceModel->getAmount()->getValue() / $priceModel->getAmount()->getValue(),2)) *100,0) ?>
<span class="product-list-promotion-span">- <?=$seller?>%</span> <span class="product-list-promotion-span">- <?=$seller?>%</span>
<style>
.product-list-promotion-span{
position: absolute;
left: 15px;
top: 15px;
z-index: 1;
color: #ffffff;
background-color: #ee0000;
font-size: 16px;
font-weight: 600;
padding: 0 10px;
}
@media (max-width: 768px) {
.product-list-promotion-span{
font-size: 12px;
font-weight: bold;
}
}
</style>
<?php endif; ?> <?php endif; ?>
...@@ -71,24 +52,6 @@ $schema = ($block->getZone() == 'item_view') ? true : false; ...@@ -71,24 +52,6 @@ $schema = ($block->getZone() == 'item_view') ? true : false;
<?php <?php
$seller = number_format((1 - number_format($finalPriceModel->getAmount()->getValue() / $priceModel->getAmount()->getValue(),2)) *100,0) ?> $seller = number_format((1 - number_format($finalPriceModel->getAmount()->getValue() / $priceModel->getAmount()->getValue(),2)) *100,0) ?>
<span class="product-info-promotion-span">- <?=$seller?>%</span> <span class="product-info-promotion-span">- <?=$seller?>%</span>
<style>
.product-info-promotion-span{
background-color: #ee0000;
height: 20px;
color: #ffffff;
font-size: 16px;
font-weight: 600;
margin-left: 10px;
padding: 2px 12px;
}
@media (max-width: 768px) {
.product-info-promotion-span{
font-size: 12px;
font-weight: bold;
}
}
</style>
<?php endif; ?> <?php endif; ?>
<?php if ($block->showMinimalPrice()) : ?> <?php if ($block->showMinimalPrice()) : ?>
......
...@@ -2902,6 +2902,47 @@ strong#block-related-heading,strong#block-upsell-heading{ font-weight: 600; colo ...@@ -2902,6 +2902,47 @@ strong#block-related-heading,strong#block-upsell-heading{ font-weight: 600; colo
z-index: 10; z-index: 10;
display: none; display: none;
} }
.product-info-promotion-span{
background-color: #ee0000;
position: absolute;
left: 15px;
top: 15px;
height: 20px;
color: #ffffff;
font-size: 16px;
font-weight: 600;
margin-left: 10px;
padding: 2px 12px;
line-height: 18px;
}
.product-list-promotion-span{
position: absolute;
left: 15px;
top: 15px;
z-index: 1;
color: #ffffff;
background-color: #ee0000;
font-size: 16px;
font-weight: 600;
padding: 0 10px;
}
@media (max-width: 768px) {
.product-info-promotion-span{
font-size: 12px;
font-weight: bold;
}
.product-list-promotion-span{
font-size: 12px;
font-weight: bold;
}
}
/*导入Joshine工具类*/ /*导入Joshine工具类*/
@import "./_joshine_col"; @import "./_joshine_col";
@import "./_joshine_utils"; @import "./_joshine_utils";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment