热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

在引导2.2.1弹窗-PopoversinBootstrap2.2.1

IamtryingtouseBootstrappopoverelementinmyapp.我尝试在我的应用程序中使用Bootstrap弹出窗口元素。Butitdoesn

I am trying to use Bootstrap popover element in my app.

我尝试在我的应用程序中使用Bootstrap弹出窗口元素。

But it doesn't seem to work. When I put the popovers in a div which has the overflow style property set.

但这似乎行不通。当我把弹窗放在一个有溢出样式属性集的div中。

However, the same code used to work in the previous bootstrap version.

但是,在以前的引导版本中使用的代码也是相同的。

You can see what I mean in this jsFiddle jsFiddle

你可以看到我在这张拉小提琴上的意思。

What has gone wrong here??

哪里出了问题?

Here is the relevant code --

这是相关的代码。

HTML -

HTML—

   
       This works
   
                   

CSS --

CSS——

@import url('http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css');

body {
    background: #666;
}

#cartridges {
    position: fixed;
    overflow: visible !important;
    bottom: 0;
    left: 0
    width: 100%;
    border-top: 1px solid #AAA;
}

#cartridges > .relative {
    width: 100%;
    height: 100%;
}

#listCartridges {
    width: 100%;
    background: #222;
}

#listCartridges > ul {
    display: inline-block;
    overflow-x: scroll;
    overflow-y: hidden;
    max-width: 100%;
    white-space: nowrap;
}

#listCartridges > ul > li {
    display: inline-block;
    margin: 3px;
    padding: 3px;
    position: relative;
    vertical-align:middle;
    border: 1px solid #474747;
    overflow: none;
}

JS --

JS——

$("[rel=popover]").popover({
    animation: true,
    trigger: 'click',
    offset: 10,
    placement: 'top',
    delay: {
        show: 500,
        hide: 100
    }
}).click(function(e) {
    e.preventDefault();
});​

1 个解决方案

#1


0  

The problem comes from overflow-x: scroll;overflow-y: hidden; in your CSS..

问题来自于overflow-x: scroll;overflow-y: hidden;在你的CSS。

It should be

它应该是

#listCartridges > ul {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
}

推荐阅读
author-avatar
只属于天天的牛牛
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有