Member-only story

card with CSS position and pseudo element

YvonneDev
Apr 29, 2019

--

GitHub

Step1:
HTML

DOM

card>img
>card_body>card_title
>card_text

Step2:
css

everything in the body position centered.

card:relative
::before is the white line absolutly at the right
::after is the white line absolutly at the bottom

card_image is relative to card and the image cover inside.

card_title::before and ::after is relative to card_title
::before is the yellow background of the title
::after is the yellow block outside of the card

I learned from Kevin Powell video here

👉Follow me for more useful web development content! love sharing🥰

--

--

YvonneDev
YvonneDev

Written by YvonneDev

❤️Front-end Web Development self-taught *share what I learned*

No responses yet