gpt4 book ai didi

html - 文字悬停图片不缩放,怎么办?

转载 作者:行者123 更新时间:2023-11-28 11:00:16 27 4
gpt4 key购买 nike

我想原谅我没有标记上一篇文章...我没有考虑过...我希望这篇文章不需要它;)

我还是遇到了同样的问题......

I had a certain problem. I have built a simple gallery, where images size is depend on the device resolution and hover effect shows detail information about the hovered photo. Images are scaling perfectly, but I had a problem with texts covering photos, which are not.

To change it, I used @media, but after that hover text is scaling only for established resolutions. My question is what to do, to have a text scaling down like a photo, when user change window browser size to custom?

<section id="gallery">
<ul class="large-block-grid-3 medium-block-grid-2 small-block-grid-1">
<li>
<div class="overlay"></div> <a href="#"></a>
<img src="http://fkdesign.pl/zurb/files/img_08.jpg" alt="Ocean" />
<div class="gallery-info">
<ul>
<li>
<h1 class="text-center"><a href="#" title="title">two grils and one cup drinking togheter</a></h1>

</li>
<li>
<dl class="small-4 columns text-center"> <dt><span class="icon-heart3" data-tooltip data-options="disable_for_touch:true" class="own-tip tip-bottom" title="Dislike video"></span></dt>

<dd><span class="value">422</span>

</dd>
<dd><span class="name">likes</span>

</dd>
</dl>
<div class="small-4 columns text-center">
<img src="http://fkdesign.pl/zurb/img/sep.png" alt="" />
</div>
<dl class="small-4 columns text-center"> <dt><span class="icon-eye3"></span></dt>

<dd><span class="value">323</span>

</dd>
<dd><span class="name">views</span>

</dd>
</dl>
</li>
</ul>
</div>
</li>
<li>
<div class="overlay"></div> <a href="#"></a>
<img src="http://fkdesign.pl/zurb/files/img_02.jpg" alt="Ocean" />
<div class="gallery-info">
<ul>
<li>
<h1 class="text-center"><a href="#" title="title">two grils and one cup drinking togheter</a></h1>

</li>
<li>
<dl class="small-4 columns text-center"> <dt><span class="icon-heart3" data-tooltip data-options="disable_for_touch:true" class="own-tip tip-bottom" title="Dislike video"></span></dt>

<dd><span class="value">422</span>

</dd>
<dd><span class="name">likes</span>

</dd>
</dl>
<div class="small-4 columns text-center">
<img src="http://fkdesign.pl/zurb/img/sep.png" alt="" />
</div>
<dl class="small-4 columns text-center"> <dt><span class="icon-eye3"></span></dt>

<dd><span class="value">323</span>

</dd>
<dd><span class="name">views</span>

</dd>
</dl>
</li>
</ul>
</div>
</li>
<li>
<div class="overlay"></div> <a href="#"></a>
<img src="http://fkdesign.pl/zurb/files/img_03.jpg" alt="Ocean" />
<div class="gallery-info">
<ul>
<li>
<h1 class="text-center"><a href="#" title="title">two grils and one cup drinking togheter</a></h1>

</li>
<li>
<dl class="small-4 columns text-center"> <dt><span class="icon-heart3" data-tooltip data-options="disable_for_touch:true" class="own-tip tip-bottom" title="Dislike video"></span></dt>

<dd><span class="value">422</span>

</dd>
<dd><span class="name">likes</span>

</dd>
</dl>
<div class="small-4 columns text-center">
<img src="http://fkdesign.pl/zurb/img/sep.png" alt="" />
</div>
<dl class="small-4 columns text-center"> <dt><span class="icon-eye3"></span></dt>

<dd><span class="value">323</span>

</dd>
<dd><span class="name">views</span>

</dd>
</dl>
</li>
</ul>
</div>
</li>
<li>
<div class="overlay"></div> <a href="#"></a>
<img src="http://fkdesign.pl/zurb/files/img_04.jpg" alt="Ocean" />
<div class="gallery-info">
<ul>
<li>
<h1 class="text-center"><a href="#" title="title">two grils and one cup drinking togheter</a></h1>

</li>
<li>
<dl class="small-4 columns text-center"> <dt><span class="icon-heart3" data-tooltip data-options="disable_for_touch:true" class="own-tip tip-bottom" title="Dislike video"></span></dt>

<dd><span class="value">422</span>

</dd>
<dd><span class="name">likes</span>

</dd>
</dl>
<div class="small-4 columns text-center">
<img src="http://fkdesign.pl/zurb/img/sep.png" alt="" />
</div>
<dl class="small-4 columns text-center"> <dt><span class="icon-eye3"></span></dt>

<dd><span class="value">323</span>

</dd>
<dd><span class="name">views</span>

</dd>
</dl>
</li>
</ul>
</div>
</li>
<li>
<div class="overlay"></div> <a href="#"></a>
<img src="http://fkdesign.pl/zurb/files/img_05.jpg" alt="Ocean" />
<div class="gallery-info">
<ul>
<li>
<h1 class="text-center"><a href="#" title="title">two grils and one cup drinking togheter</a></h1>

</li>
<li>
<dl class="small-4 columns text-center"> <dt><span class="icon-heart3" data-tooltip data-options="disable_for_touch:true" class="own-tip tip-bottom" title="Dislike video"></span></dt>

<dd><span class="value">422</span>

</dd>
<dd><span class="name">likes</span>

</dd>
</dl>
<div class="small-4 columns text-center">
<img src="http://fkdesign.pl/zurb/img/sep.png" alt="" />
</div>
<dl class="small-4 columns text-center"> <dt><span class="icon-eye3"></span></dt>

<dd><span class="value">323</span>

</dd>
<dd><span class="name">views</span>

</dd>
</dl>
</li>
</ul>
</div>
</li>
<li>
<div class="overlay"></div> <a href="#"></a>
<img src="http://fkdesign.pl/zurb/files/img_06.jpg" alt="Ocean" />
<div class="gallery-info">
<ul>
<li>
<h1 class="text-center"><a href="#" title="title">two grils and one cup drinking togheter</a></h1>

</li>
<li>
<dl class="small-4 columns text-center"> <dt><span class="icon-heart3" data-tooltip data-options="disable_for_touch:true" class="own-tip tip-bottom" title="Dislike video"></span></dt>

<dd><span class="value">422</span>

</dd>
<dd><span class="name">likes</span>

</dd>
</dl>
<div class="small-4 columns text-center">
<img src="http://fkdesign.pl/zurb/img/sep.png" alt="" />
</div>
<dl class="small-4 columns text-center"> <dt><span class="icon-eye3"></span></dt>

<dd><span class="value">323</span>

</dd>
<dd><span class="name">views</span>

</dd>
</dl>
</li>
</ul>
</div>
</li>
<li>
<div class="overlay"></div> <a href="#"></a>
<img src="http://fkdesign.pl/zurb/files/img_07.jpg" alt="Ocean" />
<div class="gallery-info">
<ul>
<li>
<h1 class="text-center"><a href="#" title="title">two grils and one cup drinking togheter</a></h1>

</li>
<li>
<dl class="small-4 columns text-center"> <dt><span class="icon-heart3" data-tooltip data-options="disable_for_touch:true" class="own-tip tip-bottom" title="Dislike video"></span></dt>

<dd><span class="value">422</span>

</dd>
<dd><span class="name">likes</span>

</dd>
</dl>
<div class="small-4 columns text-center">
<img src="http://fkdesign.pl/zurb/img/sep.png" alt="" />
</div>
<dl class="small-4 columns text-center"> <dt><span class="icon-eye3"></span></dt>

<dd><span class="value">323</span>

</dd>
<dd><span class="name">views</span>

</dd>
</dl>
</li>
</ul>
</div>
</li>
<li>
<div class="overlay"></div> <a href="#"></a>
<img src="http://fkdesign.pl/zurb/files/img_08.jpg" alt="Ocean" />
<div class="gallery-info">
<ul>
<li>
<h1 class="text-center"><a href="#" title="title">two grils and one cup drinking togheter</a></h1>

</li>
<li>
<dl class="small-4 columns text-center"> <dt><span class="icon-heart3" data-tooltip data-options="disable_for_touch:true" class="own-tip tip-bottom" title="Dislike video"></span></dt>

<dd><span class="value">422</span>

</dd>
<dd><span class="name">likes</span>

</dd>
</dl>
<div class="small-4 columns text-center">
<img src="http://fkdesign.pl/zurb/img/sep.png" alt="" />
</div>
<dl class="small-4 columns text-center"> <dt><span class="icon-eye3"></span></dt>

<dd><span class="value">323</span>

</dd>
<dd><span class="name">views</span>

</dd>
</dl>
</li>
</ul>
</div>
</li>
<li>
<div class="overlay"></div> <a href="#"></a>
<img src="http://fkdesign.pl/zurb/files/img_09.jpg" alt="Ocean" />
<div class="gallery-info">
<ul>
<li>
<h1 class="text-center"><a href="#" title="title">two grils and one cup drinking togheter</a></h1>

</li>
<li>
<dl class="small-4 columns text-center"> <dt><span class="icon-heart3" data-tooltip data-options="disable_for_touch:true" class="own-tip tip-bottom" title="Dislike video"></span></dt>

<dd><span class="value">422</span>

</dd>
<dd><span class="name">likes</span>

</dd>
</dl>
<div class="small-4 columns text-center">
<img src="http://fkdesign.pl/zurb/img/sep.png" alt="" />
</div>
<dl class="small-4 columns text-center"> <dt><span class="icon-eye3"></span></dt>

<dd><span class="value">323</span>

</dd>
<dd><span class="name">views</span>

</dd>
</dl>
</li>
</ul>
</div>
</li>
<li>
<div class="overlay"></div> <a href="#"></a>
<img src="http://fkdesign.pl/zurb/files/img_10.jpg" alt="Ocean" />
<div class="gallery-info">
<ul>
<li>
<h1 class="text-center"><a href="#" title="title">two grils and one cup drinking togheter</a></h1>

</li>
<li>
<dl class="small-4 columns text-center"> <dt><span class="icon-heart3" data-tooltip data-options="disable_for_touch:true" class="own-tip tip-bottom" title="Dislike video"></span></dt>

<dd><span class="value">422</span>

</dd>
<dd><span class="name">likes</span>

</dd>
</dl>
<div class="small-4 columns text-center">
<img src="http://fkdesign.pl/zurb/img/sep.png" alt="" />
</div>
<dl class="small-4 columns text-center"> <dt><span class="icon-eye3"></span></dt>

<dd><span class="value">323</span>

</dd>
<dd><span class="name">views</span>

</dd>
</dl>
</li>
</ul>
</div>
</li>
<li>
<div class="overlay"></div> <a href="#"></a>
<img src="http://fkdesign.pl/zurb/files/img_11.jpg" alt="Ocean" />
<div class="gallery-info">
<ul>
<li>
<h1 class="text-center"><a href="#" title="title">two grils and one cup drinking togheter</a></h1>

</li>
<li>
<dl class="small-4 columns text-center"> <dt><span class="icon-heart3" data-tooltip data-options="disable_for_touch:true" class="own-tip tip-bottom" title="Dislike video"></span></dt>

<dd><span class="value">422</span>

</dd>
<dd><span class="name">likes</span>

</dd>
</dl>
<div class="small-4 columns text-center">
<img src="http://fkdesign.pl/zurb/img/sep.png" alt="" />
</div>
<dl class="small-4 columns text-center"> <dt><span class="icon-eye3"></span></dt>

<dd><span class="value">323</span>

</dd>
<dd><span class="name">views</span>

</dd>
</dl>
</li>
</ul>
</div>
</li>
<li>
<div class="overlay"></div> <a href="#"></a>
<img src="http://fkdesign.pl/zurb/files/img_12.jpg" alt="Ocean" />
<div class="gallery-info">
<ul>
<li>
<h1 class="text-center"><a href="#" title="title">two grils and one cup drinking togheter</a></h1>

</li>
<li>
<dl class="small-4 columns text-center"> <dt><span class="icon-heart3" data-tooltip data-options="disable_for_touch:true" class="own-tip tip-bottom" title="Dislike video"></span></dt>

<dd><span class="value">422</span>

</dd>
<dd><span class="name">likes</span>

</dd>
</dl>
<div class="small-4 columns text-center">
<img src="http://fkdesign.pl/zurb/img/sep.png" alt="" />
</div>
<dl class="small-4 columns text-center"> <dt><span class="icon-eye3"></span></dt>

<dd><span class="value">323</span>

</dd>
<dd><span class="name">views</span>

</dd>
</dl>
</li>
</ul>
</div>
</li>
</ul>
</section>

Here is link to jsfiddle.net

最佳答案

以下是你的问题的方向和解决方案:

我打赌你想做类似于 Paravel's FitText 的事情它是一个 jQuery 插件。您需要运行 jQuery运行它。

我没有提供完整的代码示例,而是将解决方案的方向和空间留给您先探索,以帮助您长期学习。

关于html - 文字悬停图片不缩放,怎么办?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22480017/

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