gpt4 book ai didi

CSS 帮助 - Shopify Blockshop 主题收藏页面 alt 图片悬停变化

转载 作者:太空宇宙 更新时间:2023-11-04 12:38:16 24 4
gpt4 key购买 nike

已编辑Maddy - 非常感谢,下面的问题 1 和 3 非常有效,很高兴学会了如何做到这一点。关于 #2 - 在下面的原文中进行编辑。

///原创从这里开始///

需要修复此网站的收藏页面上的以下内容,这是其中一个收藏页面的示例: http://www.sachinandbabi.com/collections/tops

  1. 移除悬停时的不透明度
  2. 对于 267 像素宽的拇指,鼠标悬停时的替代图像显示偏移。示例:基努托普。需要解决这个问题。 编辑:添加屏幕截图链接以显示正在发生的事情 - 对于 267 PX 宽的拇指,悬停图像显示在原始拇指左侧 43PX,它应该出现在鼠标悬停时,直接在原始图像上方至于隐藏原始图像。

链接: https://drive.google.com/file/d/0Bxyx2FFWzBJjRGhCVVlBR1dadWs/view?usp=sharing

  1. “SALE”和“SOLD OUT”圆圈需要出现以保持鼠标悬停

我试图自己解决这个问题,但遇到了瓶颈。如果有人能够提供帮助,并且我需要提供更多信息,请告诉我,以便我发送。

下面是我的 style.css.liquid 模块和图像包装器。谢谢大家。

/* ===============================================
// 4.10 Reveal module
// =============================================== */

.reveal .hidden { display: block !important; visibility: visible !important;}
.product:hover .reveal img { opacity: 1; }
.reveal { position: relative; }
.reveal .hidden {
position: absolute;
z-index: -1;
top: 0;
width: auto;
height: 100%;
opacity: 0;
-webkit-transition: opacity 0.3s ease-in-out;
-moz-transition: opacity 0.3s ease-in-out;
-o-transition: opacity 0.3s ease-in-out;
transition: opacity 0.3s ease-in-out;
}
.reveal:hover .hidden {
z-index: 100000;
opacity: 1;
}
.reveal .caption {
position: absolute;
top: 0;
display: table;
width: auto;
height: 100%;
background-color: white; /* fallback for IE8 */
background-color: rgba(255, 255, 255, 0.7);
font: 13px/1.6 sans-serif;
text-transform: uppercase;
color: #333;
letter-spacing: 1px;
text-align: center;
text-rendering: optimizeLegibility;
}
.reveal .hidden .caption .centered {
display: table-cell;
vertical-align: middle;
}

@media (min-width: 480px) and (max-width: 979px) {
.reveal .caption {
font-size: 11px;
}
}




/*Here's the image wrapper from snippet-product-item.liquid*/

<div class="product-item {{ column-classes }}">
<div class="image-wrapper">
{% if product.available == false %}
<div class="circle sold-out">Sold<br />Out</div>
{% elsif product.compare_at_price > product.price %}
<a class="circle sale" href="{{ product.url | within: collection }}">Sale</a>
{% endif %}
{% assign ratio = settings.product_img_w_to_h_ratio | times: 1.0 %}
<a href="{{ product.url | within: collection }}">
{% if snippet-product-item == '3' or ratio < 1 %}
<div class="reveal">
<img {% if product_slider %}class="lazyOwl" data-src="{{ product.featured_image.src | product_img_url: 'large' }}"{% endif%} src="{{ product.featured_image.src | product_img_url: 'large' }}" alt="{{ product.featured_image.alt | escape }}" />
{% else %}
<img {% if product_slider %}class="lazyOwl" data-src="{{ product.featured_image.src | product_img_url: 'medium' }}"{% endif%} src="{{ product.featured_image.src | product_img_url: 'medium' }}" alt="{{ product.featured_image.alt | escape }}" />
{% endif %}
{% if snippet-product-item == '3' or ratio < 1 %}
<img class = "hidden" {% if product_slider %}class="lazyOwl" data-src="{{ product.images[2] | product_img_url: 'large' }}"{% endif%} src="{{ product.images[2] | product_img_url: 'large' }}" alt="{{ product.images[2]alt | escape }}" />
{% else %}
<img class = "hidden" {% if product_slider %}class="lazyOwl" data-src="{{ product.images[2] | product_img_url: 'medium' }}"{% endif%} src="{{ product.images[2] | product_img_url: 'medium' }}" alt="{{ product.images[2]alt | escape }}" />
{% endif %}
</div>
</a>
</div><!-- .coll-image-wrap -->

最佳答案

你必须在你的CSS中做一些改变:-

对于不透明度:-

 .product-grid .image-wrapper {
display: inline-block;
max-width: 100%;
opacity: 1 !important; // add this in your css
position: relative;
width: 100%;
}

对于“SALE”和“SOLD OUT”圆圈 -

.reveal {
position: relative;
z-index: 1; // add this in your css
}

.product-grid .circle {
font-size: 1.16667em;
height: 90px;
padding: 35px 0 0;
right: 15px;
top: 15px;
width: 90px;
z-index: 2; // add this in your css
}

图像悬停变化:-

.reveal .hidden {
height: 100%;
left: 10px; // Change this in your css
opacity: 0;
position: absolute;
top: 0;
transition: opacity 0.3s ease-in-out 0s;
width: auto;
z-index: -1; }

关于CSS 帮助 - Shopify Blockshop 主题收藏页面 alt 图片悬停变化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27103421/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com