|Deviant Login||Shop||Join deviantART for FREE||Take the Tour|
CSS Tricks: Before and After!No, this is not about a tv show in which I take a CSS and make it prettier
It is about the pseudo-elements ::before and ::after.
They are similiar for example to the :hover element, meaning that it is not necessary (or possible) to add them to the HTML, but can be controlled purely by writing CSS. They are always there, but whether they are visible depends on whether you code them or not.
::before and ::after are almost self-explanatory pseudo-elements. They define what happens either before or after a regular HTML element. They can be applied to any element.
Let's get right going!
So in the first simple example we are going to add guillemets, also known as French quotation marks, to direct speech in our text. The usefulness of this may stand to debate, you could easily just type it out, but it is a nice and easy way to get started with explaining ::before and ::after.
We will take advantage of the i HTML class fo
A Bloody, Stupid Miracle The day we’d cured the human condition was the day I put a bullet through my head and didn’t die. It was also the day I realized how scared I actually was of death, and after hours of muscle ache from holding that gauze against my open skull, after the wound closed and everything went back to normal, I had myself a good old-fashioned brainstorm. How ironic.
But when summer came, everything had fallen to shit. The air scorched my skin and parched my tongue every time I took a breath. The sun glared down on a rapidly-collapsing world, full of the undying bastard children of cruelty and misfortune. What was one to do when their cells regenerated faster than they decomposed?
My feet hit the pavement, now littered with jagged bits of glass to snap at my toes, thoroughly baked by the blazing ball of bitter disdain high overhead. Today was worse than yesterday. Though I’d often wondered the purpose of it anymore, I
Keep in Touch!