【问题标题】:border-radius not working in ion-cards边界半径在离子卡中不起作用
【发布时间】:2018-03-08 12:35:43
【问题描述】:

我想在第一张卡片前添加一个颜色为#F1F1F1 的空格。 并且还想在离子卡上添加边框半径。 图像如下。

图中左右两边的曲线是离子卡,上面是头部和卡之间的空间。

通过在下面的代码中添加section 添加空间,但卡片边框半径没有很好地显示。 我怎样才能做到这一点?

.html

<ion-header>
<ion-toolbar>
Ionic Cards
</ion-toolbar>
</ion-header>

<ion-content>

<section class="blankspace"></section>

<ion-card class="card">
   //card content
</ion-card>
</ion-content>

.css

.blankspace {
border-bottom: 5px solid #F1f1f1;
}

.card {

border-radius: 5px;
}

【问题讨论】:

  • .card { 边框半径:5px;溢出:隐藏; }
  • 离子卡 {border-radius: 5px;} 试试这个

标签: html css ionic-framework ionic2


【解决方案1】:

HTML 代码:

<ion-card style="border-radius: 25px;">

它对我有用。

【讨论】:

    【解决方案2】:

    也许可以工作,但没有剪辑内容,试试这个

    .card {
      border-radius: 5px;
      overflow: hidden;
    }
    

    【讨论】:

    • 底部半径有效,但顶部半径不适合我
    • 对不起,我现在无法重现你的代码,也许是上面的空白?尝试隔离卡
    猜你喜欢
    • 2012-06-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-01
    相关资源
    最近更新 更多