Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
joshine
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
joshine
Commits
0d3cc53c
Commit
0d3cc53c
authored
Sep 22, 2022
by
王东红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
类目页样式优化
parent
8828c5dd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
88 additions
and
1 deletions
+88
-1
app/code/Magento/Catalog/view/frontend/templates/product/list.phtml
+15
-1
app/design/frontend/Joshine/breeze/web/css/_custom.less
+73
-0
No files found.
app/code/Magento/Catalog/view/frontend/templates/product/list.phtml
View file @
0d3cc53c
...
@@ -44,6 +44,7 @@ $_helper = $block->getData('outputHelper');
...
@@ -44,6 +44,7 @@ $_helper = $block->getData('outputHelper');
*/
*/
$pos
=
$block
->
getPositioned
();
$pos
=
$block
->
getPositioned
();
?>
?>
<div
class=
"products wrapper
<?=
/* @noEscape */
$viewMode
?>
products-
<?=
/* @noEscape */
$viewMode
?>
"
>
<div
class=
"products wrapper
<?=
/* @noEscape */
$viewMode
?>
products-
<?=
/* @noEscape */
$viewMode
?>
"
>
<ol
class=
"products list items product-items"
>
<ol
class=
"products list items product-items"
>
<?php
/** @var $_product \Magento\Catalog\Model\Product */
?>
<?php
/** @var $_product \Magento\Catalog\Model\Product */
?>
...
@@ -63,7 +64,20 @@ $_helper = $block->getData('outputHelper');
...
@@ -63,7 +64,20 @@ $_helper = $block->getData('outputHelper');
<
a
href
=
"<?=
$escaper->escapeUrl
(
$_product->getProductUrl
()) ?>"
<
a
href
=
"<?=
$escaper->escapeUrl
(
$_product->getProductUrl
()) ?>"
class
="
product
photo
product
-
item
-
photo
"
class
="
product
photo
product
-
item
-
photo
"
tabindex="
-
1
">
tabindex="
-
1
">
<?=
$productImage->toHtml
() ?>
<span class="
image0
image
-
switch
">
<span class="
product
-
image
-
container
product
-
image
-
container
-<?=
/* @noEscape */
$_product
->
getId
()
?>
" style="width: 440px;">
<span
class=
"product-image-wrapper"
style=
"padding-bottom: 125%;"
>
<?=
$productImage
->
toHtml
()
?>
</span>
</span>
</span>
<span
class=
"image1 image-switch"
>
<span
class=
"product-image-container product-image-container-
<?=
/* @noEscape */
$_product
->
getId
()
?>
"
style=
"width: 440px;"
>
<span
class=
"product-image-wrapper"
style=
"padding-bottom: 125%;"
>
<?=
$productImage
->
toHtml
()
?>
</span>
</span>
</span>
</a>
</a>
<div
class=
"product details product-item-details"
>
<div
class=
"product details product-item-details"
>
<?=
$block
->
getProductDetailsHtml
(
$_product
)
?>
<?=
$block
->
getProductDetailsHtml
(
$_product
)
?>
...
...
app/design/frontend/Joshine/breeze/web/css/_custom.less
View file @
0d3cc53c
...
@@ -1390,6 +1390,79 @@ footer{
...
@@ -1390,6 +1390,79 @@ footer{
}
}
}
}
//.product-items .product-item-photo:hover {
// transform: scale(1.02);
// transition: all 0.5s ease;
//}
.image0.image-switch {
postion: relative;
}
.image1.image-switch {
position: absolute;
top: 0;
left: 0;
bottom:0;
right: 0;
z-index: -1;
opacity: 0;
visibility: hidden;
}
.product-items .product-item-photo{
overflow: hidden;
}
@media (min-width: 992px) {
.product-item:hover .product-item-info .image0,
.product-list-item:hover .product-item-info .image0 {
z-index: -1;
opacity: 0;
visibility: hidden;
}
}
.product-item:hover .product-item-info .image1,
.product-list-item:hover .product-item-info .image1 {
opacity: 1;
visibility: visible;
z-index: 1;
-webkit-transform: scale(1.08);
-moz-transform: scale(1.08);
-ms-transform: scale(1.08);
-o-transform: scale(1.08);
transition: all 0.5s ease;
}
.product-item:hover .product-item-info .product-image-photo,
.product-list-item:hover .product-item-info .product-image-photo {
opacity: 1;
}
.product-item .product-item-info,
.product-list-item .product-item-info {
position: relative;
z-index: 1;
overflow: hidden;
}
.product-item .product-item-info .image0,
.product-list-item .product-item-info .image0 {
transition: all 0.5s ease;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
}
.product-item .product-item-info .image1,
.product-list-item .product-item-info .image1 {
position: absolute;
top: 0;
left: 0;
opacity: 0;
z-index: -1;
visibility: hidden;
transition: all 0.5s ease;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
}
@media(max-width:789px){
@media(max-width:789px){
.banner-4-cate{
.banner-4-cate{
padding-bottom: 20px;
padding-bottom: 20px;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment