DEV Community

Chris Jarvis
Chris Jarvis

Posted on • Edited on

1

CSS Halloween Faces: Pumpkin

So far I have made aliens, ghouls, and skulls with CSS. What else could I make for Halloween? How about a Jack O'Lantern?

I started by changing the background color to orange to match a pumpkin.

.minifig_face {
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ff9800; 
    flex-direction: column;
    border: 4px solid black;
}

Enter fullscreen mode Exit fullscreen mode

Next I changed the size of the eyes. I made them longer and oval shaped. I changed the border style from solid to double to make look carved into the pumpkin shell. Finally I changed the background color to look like the interior of a pumpkin.

Then used the eye shape for the mouth and decided to just drop the nose altogether.

Jack o Lantern

.eyes {
    height: 195px;
    width: 145px;
    background: #FFF8E1;
    border-radius: 100%;
    border: double 4px black;
    margin:-10px 10px 0px 10px;
    display: flex;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
Enter fullscreen mode Exit fullscreen mode

I have a Jack O'Lantern. But quickly changing the colors and removing the pupils and border from the eyes. gives me a Howling Ghost.

Howling ghost white with large oval eyes and mouth.

A gallery of other CSS creations.

Skull
Alt Text

Ghoul

Alt Text

Alien

Green alien face. Alien has large round eyes with thin black pupils.

Alien with scales
snake skin alien

    background-image: url(fish-net.png), radial-gradient(rgba(255, 204, 0, 0.01), rgb(253, 245, 192)); 
Enter fullscreen mode Exit fullscreen mode

This branched off Cody Pearce's Bender in CSS post.

Have you ever made something cool with CSS? Share it.

-$JarvisScript git push

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay