html - 保持覆盖文本固定 [html]
问题描述
当您将鼠标光标移动到图形顶部时,会出现一个覆盖文本。我想保持覆盖固定。也就是说,始终显示文本而不需要在图形上移动光标。
下面是我的代码:
<div class="col-md-6 col-sm-6 col-xs-6 fh5co-work-wrap">
<a href="http://people.tamu.edu/~nsthiago/Hollenbach_Silva_JOP_2018.pdf" target="_blank" class="fh5co-work-item js-fh5co-work-item">
<img src="images/jop_2018.png" alt="Image" class="img-responsive">
<div class="fh5co-overlay-bg js-fh5co-overlay-bg"></div>
<div class="fh5co-overlay-text js-fh5co-overlay-text">
<h2> Fiscal Capacity and Inequality: Evidence from Brazilian Municipalities [JOP 2018] </h2>
<ul class="fh5co-categories">
<li>With Florian Hollenbach</li>
</ul>
</div>
</a>
</div>
这是我的网站的链接,其中包含更多示例: http: //people.tamu.edu/~nsthiago/
提前致谢!
解决方案
文本及其白色背景设置为opacity: 0
然后在使用 javascript 悬停时更改。只需打开 CSS 文件,然后将不透明度更改为1
. 就在这儿:
.fh5co-overlay-text,
.fh5co-overlay-bg {
position: absolute;
opacity: 0; // change this to 1
}
style.scss 的第 347 - 351 行
推荐阅读
- unity3d - 将着色器中的 float2/vector2 属性公开给 Unity 材质检查器
- python - 如何在训练测试拆分后仅标准化 int64 列?
- python - 当我试图在 python 中更改矩阵的第一行的值时,所有行的值都发生了变化
- c++ - 调用 NtCreateProcessEx 失败无异常
- android - 应用程序崩溃:方法抛出“com.google.firebase.components.MissingDependencyException”异常
- swift - Xcodebuild 不运行作为 XCTestCase 子类的子类的测试
- javascript - 如何将 select2 数组输出转换为单个字符串?
- python - 预测游戏结果的下一个值
- python - 如何在请求中流式传输文件?
- javascript - 是否可以将多个对象数组保存为一个?