小编Leo*_*aes的帖子

css溢出x无法正常工作

我试图在容器中放置多个div(图像 - >黑色块)(图像 - >蓝色块).我需要在容器中放置尽可能多的div.容器具有"浮动"宽度,因此在每个屏幕中具有不同的尺寸."1"(在图像中)代表我今天所拥有的,它正在发挥作用.

问题是我在整个站点中使用bootstrap popover,但容器中的溢出不允许它出现.如果我删除溢出属性(图像中的"2"),则所有div都显示在"下"行中.我不想滚动,只是隐藏不适合容器的div.

图像中的"3"代表我想要的东西.

在此输入图像描述

这是我的代码:

// CSS
.content-bar{
        max-width:100%;
        height: 3.5em;
        white-space:nowrap;
        display: inline-block;
        overflow-x: hidden;
        overflow-y: visible;
}

.photo-bar{
        width: 2.5em;
        height: 3.5em;
        margin-right: -.55em;
        padding: 0;
        display: inline-block;
        white-space: normal;                
}

// JS
<div class="content-bar">
        <div class="photo-bar" ng-repeat="...">                    
             // image goes here
        </div>
</div>
Run Code Online (Sandbox Code Playgroud)

css overflow css3 angularjs

6
推荐指数
1
解决办法
590
查看次数

如何在 Ionic Page 中定义可选的段参数?

如何在 Ionic 3 PWA 中定义可选参数?

我当前的@IonicPage装饰器看起来像:

@IonicPage({
    segment: "landing/:id"
})
Run Code Online (Sandbox Code Playgroud)

id参数必须是可选的。如果我没有通过id,我会收到此错误:

未捕获(承诺):要插入的无效视图

怎么做?
提前致谢!

typescript ionic-framework ionic2 ionic3 angular

5
推荐指数
1
解决办法
2114
查看次数