Styling a ion-card with special background


#1

hello,

i’d like to style a ion-card in a way that looks like a post-it with a piece of tape on the top.
i was able to change the background to a paper-image, but how can I add the “tape”.
Do I need to add a div and then style that?

cheers!


#2

Css rule :before should be what you need.


#3

ευχαριστώ πολύ!
So there is no “Ionic-way” to do things.
Just pure sass/css, right?


#4

By reading the description of your goal, the simplest approach I can think of, would be to do it via css, yes.

Since what you are aiming for is a quite non-standard customization of a card, there’s no particular “standard ionic way” to do it, since an ion-card component has not much of an API to configure it other than to declare it (and that is by design to keep it clean). Anything beyond that would be done via CSS.

Εσύ να 'σαι καλά, χαρά μου να βλέπω Έλληνες στο Ionic. Καλημέρα και καλή συνέχεια!


#5

Please tell me how to customize ion-card? Like changing it’s background color or size, I couldn’t find this in API docs please help. Thanks