[英]Css Border hover image effect
I'm trying to apply an hover effect above an image in a wordpress theme. 我正在尝试在wordpress主题中的图像上方应用悬停效果。 The effect should show a border and a background with a text. 效果应显示边框和带有文字的背景。 The problem is that the border is wider and higher than the image and I cannot understand why. 问题是边框比图像更宽和更高,我不明白为什么。 I've tried many solution but the result is always the same: the border appears only in my top and left side. 我尝试了许多解决方案,但结果始终相同:边框仅出现在我的顶部和左侧。 I'm going crazy.... 我要疯了....
Here's the link at my page: 这是我页面上的链接:
http://boscolo.dm-cloud.net/ http://boscolo.dm-cloud.net/
Any suggestion? 有什么建议吗?
Thanks in advance, Francesco 在此先感谢,弗朗切斯科
Add this code 添加此代码
.topImage2 .bordo {
border: 0 solid #fff;
box-sizing: border-box;
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
z-index: 78;
}
You just have to add box-sizing: border-box;
您只需要添加box-sizing: border-box;
to .topImage2 .bordo
到.topImage2 .bordo
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.