html图像标题仅在鼠标悬停在两侧时起作用

基卡达斯

我有一个奇怪的错误,在轮播中,图片中的标题(或标题)属性仅出现在侧面中,而在我的其中一个页面中。

我注意到它可能与指示器或幻灯片或旋转木马(来自引导程序)有关,因为在未显示标题的区域中,指示器是正常的,而在指示器略微褪色的区域中,标题有效。

我附上了一些图片,以显示指示器的淡入淡出以及鼠标所在的位置(是的,肮脏的蓝色绘画在鼠标所在的位置上少得多)。标题是黄色区域。

在此处输入图片说明

在此处输入图片说明

这是该代码:

<div class = box style = "margin: 0">
        <div id="myCarousel" class="carousel slide" data-ride="carousel" data-interval="10000">
            <!-- Indicators -->
            <ol class="carousel-indicators carousel-control" >
                <li data-target="#myCarousel" data-slide-to="0" title="New Location: 12/03/2014" class="active" ></li>
                <li data-target="#myCarousel" data-slide-to="1" title="Bake Sale Success: 21/07/2015"></li>
            </ol>

            <!-- Wrapper for slides -->
            <div class="carousel-inner">

                <div class="item active">
                    <h2 class="featurette-heading subHeadingText">New Location</h2>
                    <img class="img-responsive center-block" src="../images/Reading%20School.jpg"
                         style="width: 70%; height: 70%;" title="Reading School, new location">

                </div>
<!-- Second slide would come here-->

            </div>
        </div>
    </div>

The question is simple (the answer maybe not xD) How do I make the title to appear when the mouse is over the whole picture?

EDIT: as sujested here is a JSfiddle example http://jsfiddle.net/r2wLz6xr/16/

PinkTurtle

For some reason your ol.carousel-indicators extends to the whole available height hence covering your images (just not a small part to the left).

Try adding something like

.carousel-indicators{
    height:20px;
}

I am positive it fixes your issue in the fiddle you provided.

As an extra piece of advice, Firefox got a real cool Firebug extension where you can inspect and see the dimensions for every HTML element in your page. I think there is something similar in Chrome too. Hope this helps.

编辑Bootstrap CSS中的2个地方是一个border-bottom指令carousel-indicators,使它一直向下延伸。我猜想删除它们会更干净。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

为什么当我将鼠标悬停在图像上时它不起作用?

将鼠标悬停在图像上以显示文本框不起作用(html、css)

将鼠标悬停在列表链接上时,ul li项目符号点图像不起作用

仅在将鼠标悬停在图像上时出现在图像上

当鼠标悬停在两个重叠的画布上时,CSS下拉菜单不起作用

将鼠标悬停在JavaFx上时如何显示图像标题

将鼠标悬停在图像上时,显示带有半透明颜色覆盖的标题

将鼠标悬停在图像上时使标题下划线

鼠标悬停在DataList上的图像弹出窗口在Asp.net中不起作用

仅在鼠标悬停在桌子上时显示按钮

JButtons 仅在鼠标悬停在它们上方时出现

将鼠标悬停在图像上时显示图像

将鼠标悬停在<li>上不起作用!

将鼠标悬停在按钮上时,为什么我的按钮不起作用?

将鼠标悬停在图像上时按钮显示

将鼠标悬停在图像上时显示标签

在鼠标悬停在图像上时显示文本

将鼠标悬停在图像上时使按钮出现

鼠标悬停在<div>中时如何显示图像?

使用 CSS/HTML + Transitions 将鼠标悬停在图像上时如何显示 div?

将鼠标悬停在图像上时放大-CSS和HTML

将鼠标悬停在图像上会更改HTML背景

鼠标悬停事件在TableView的标题中不起作用

图像滚动时,使标题显示在鼠标悬停时

鼠标悬停在图像上

鼠标悬停在右侧的图像

将鼠标悬停在图像上时,图像下方的图像不透明度和标题颜色会发生变化...同样,当标题变为两行时,它会破坏格式

在鼠标悬停时向图像添加文本标题

svg虚线仅在鼠标悬停在路径上时悬停