图像悬停效果问题 [英] Image hover effect issue

查看:127
本文介绍了图像悬停效果问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试   执行   效果      I   pass  < span class =code-leadattribute>   mouse   over   on   a   picture   I  想要   show  < span class =code-leadattribute> a   black   box    出现 关闭   想要     a   square       middle  保持 其中  希望   地点   图标    a  搜索 图标

但是 a 问题 因为 想要 我的 图片 宽度:155px; 身高:140px;

this width height I' m sucess with effect 已经 尝试 很多 alternative 工作

可以 您的帮助?


工作 罚款:

http: // jsfiddle.net/ritz/cQL4S /

但是 想要 less image 工作 < span class =code-leadattribute> bad:

http: / / jsfiddle.net/ritz/cQL4S/1

解决方案

< blockquote>我想在本节中:

第二效应:悬停掩码 {
opacity 1;
border 45px solid rgba(0,0,0,0.7);
}



您必须调整边框设置以适应新视图大小调整...我将其更改为45只是为了看看发生了什么..


I’m trying to do an effect that when I pass the mouse over on a picture I want to show a black box that appears closing and I want that only a square in the middle stays where I want to place an icon of a search icon.

But I´m having a problem because I wanted my picture have width:155px; and height:140px;

And with this width and height I´m not having sucess with the effect, I already try many alternatives but its not working.

Can you give me your help?


This works fine:

http://jsfiddle.net/ritz/cQL4S/

But I want with smaller image, and works bad:

http://jsfiddle.net/ritz/cQL4S/1

解决方案

I think in this section:

.second-effect:hover .mask {
   opacity: 1;
   border:45px solid rgba(0,0,0,0.7);
}


You will have to adjust the border setting to accomodate the new view sizing...I changed it to 45 just to see what happened..


这篇关于图像悬停效果问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆