How do you deal with div with mat-card-header-text in an material2 card?

后端 未结 10 1557
逝去的感伤
逝去的感伤 2021-02-18 20:04

I can\'t seem to wrap my head around having this container in an md card.

In my material cards, I have this:

&
10条回答
  •  伪装坚强ぢ
    2021-02-18 20:36

    Fixed it using the following css and html:

    md-card-title > span {
        background-color: #fff;
        background-color: rgba(255, 255, 255, 0.5);
        position: absolute;
        margin-top: -81px;
        margin-left: -24px;
        font-size: 20px;
        padding: 10px;
    }
    
    
    {{ article.title }}

    {{ article.description }}

    Using gives some odd spacing issues. Not sure if this is a bug or not.

提交回复
热议问题