jquery - 带有标题显示表的 slider

标签 jquery html css

我用 jQuery 循环制作了一个 slider 。我已经准备好了

.image img {
    width: 100%; 
    height: 100%;
    position: absolute;
    display: table; 
}

还有标题

.caption {
    position: relative;
    z-index: 99;    
    color: white;
    text-align: center;
    display: table-cell; 
    vertical-align: middle; 
}

这个东西将文本对齐到中间和居中。好的。但是,当我将幻灯片 #1 更改为幻灯片 #2 并且在我返回幻灯片 #1 后,文本不会停留在中间。

enter image description here

最佳答案

我来解决!

jQuery 在更改 slider 后删除 display: table;。我使用 display: table !important; 来解决这个问题。

关于jquery - 带有标题显示表的 slider ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30276758/

相关文章:

php - 将HTML文件另存为PDF

html - 整个导航的渐变,而不是 li

javascript - 单选按钮表单上的参数列表后缺少 jquery )

javascript - 对我的 javascript 数组进行一些更改,但它在数组中以逗号分隔

javascript - Codeigniter、jQuery 和 Ajax - 动态显示新数据库内容时防止页面刷新

html - Bootstrap 3 折叠其他

jquery - 在 jQuery 中获取元素的宽度作为 float

javascript - 如何获得相对于另一个 div 但具有 z-index 的 div

css - 两种声明样式规则的方式之间的空间有什么区别

html - anchor 内的段落无法格式化