#css animations
Explore tagged Tumblr posts
Text

Animated Gradient Background
#animated background#css animation#css animation tutorial#css animation examples#css animated background#background animation#html css#divinector#css animations
2 notes
·
View notes
Text
Getting Creative With HTML Dialog
New Post has been published on https://thedigitalinsider.com/getting-creative-with-html-dialog/
Getting Creative With HTML Dialog
Like ’em or loath ’em, whether you’re showing an alert, a message, or a newsletter signup, dialogue boxes draw attention to a particular piece of content without sending someone to a different page. In the past, dialogues relied on a mix of divisions, ARIA, and JavaScript. But the HTML dialog element has made them more accessible and style-able in countless ways.
So, how can you take dialogue box design beyond the generic look of frameworks and templates? How can you style them to reflect a brand’s visual identity and help to tell its stories? Here’s how I do it in CSS using ::backdrop, backdrop-filter, and animations.
Design by Andy Clarke, Stuff & Nonsense. Mike Worth’s website will launch in June 2025, but you can see examples from this article on CodePen.
I mentioned before that Emmy-award-winning game composer Mike Worth hired me to create a highly graphical design. Mike loves ’90s animation, and he challenged me to find ways to incorporate its retro style without making a pastiche. However, I also needed to achieve that retro feel while maintaining accessibility, performance, responsiveness, and semantics.
A brief overview of dialog and ::backdrop
Let’s run through a quick refresher.
Note: While I mostly refer to “dialogue boxes” throughout, the HTML element is spelt dialog.
dialog is an HTML element designed for implementing modal and non-modal dialogue boxes in products and website interfaces. It comes with built-in functionality, including closing a box using the keyboard Esc key, focus trapping to keep it inside the box, show and hide methods, and a ::backdrop pseudo-element for styling a box’s overlay.
The HTML markup is just what you might expect:
<dialog> <h2>Keep me informed</h2> <!-- ... --> <button>Close</button> </dialog>
This type of dialogue box is hidden by default, but adding the open attribute makes it visible when the page loads:
<dialog open> <h2>Keep me informed</h2> <!-- ... --> <button>Close</button> </dialog>
I can’t imagine too many applications for non-modals which are open by default, so ordinarily I need a button which opens a dialogue box:
<dialog> <!-- ... --> </dialog> <button>Keep me informed</button>
Plus a little bit of JavaScript, which opens the modal:
const dialog = document.querySelector("dialog"); const showButton = document.querySelector("dialog + button"); showButton.addEventListener("click", () => dialog.showModal(); );
Closing a dialogue box also requires JavaScript:
const closeButton = document.querySelector("dialog button"); closeButton.addEventListener("click", () => dialog.close(); );
Unless the box contains a form using method="dialog", which allows it to close automatically on submit without JavaScript:
<dialog> <form method="dialog"> <button>Submit</button> </form> </dialog>
The dialog element was developed to be accessible out of the box. It traps focus, supports the Esc key, and behaves like a proper modal. But to help screen readers announce dialogue boxes properly, you’ll want to add an aria-labelledby attribute. This tells assistive technology where to find the dialogue box’s title so it can be read aloud when the modal opens.
<dialog aria-labelledby="dialog-title"> <h2 id="dialog-title">Keep me informed</h2> <!-- ... --> </dialog>
Most tutorials I’ve seen include very little styling for dialog and ::backdrop, which might explain why so many dialogue boxes have little more than border radii and a box-shadow applied.
Out-of-the-box dialogue designs
I believe that every element in a design — no matter how small or infrequently seen — is an opportunity to present a brand and tell a story about its products or services. I know there are moments during someone’s journey through a design where paying special attention to design can make their experience more memorable.
Dialogue boxes are just one of those moments, and Mike Worth’s design offers plenty of opportunities to reflect his brand or connect directly to someone’s place in Mike’s story. That might be by styling a newsletter sign-up dialogue to match the scrolls in his news section.
Mike Worth concept design, designed by Andy Clarke, Stuff & Nonsense.
Or making the form modal on his error pages look like a comic-book speech balloon.
Mike Worth concept design, designed by Andy Clarke, Stuff & Nonsense.
dialog in action
Mike’s drop-down navigation menu looks like an ancient stone tablet.
Mike Worth, designed by Andy Clarke, Stuff & Nonsense.
I wanted to extend this look to his dialogue boxes with a three-dimensional tablet and a jungle leaf-filled backdrop.
Mike Worth, designed by Andy Clarke, Stuff & Nonsense.
This dialog contains a newsletter sign-up form with an email input and a submit button:
<dialog> <h2>Keep me informed</h2> <form> <label for="email" data-visibility="hidden">Email address</label> <input type="email" id="email" required> <button>Submit</button> </form> <button>x</button> </dialog>
I started by applying dimensions to the dialog and adding the SVG stone tablet background image:
dialog width: 420px; height: 480px; background-color: transparent; background-image: url("dialog.svg"); background-repeat: no-repeat; background-size: contain;
Then, I added the leafy green background image to the dialogue box’s generated backdrop using the ::backdrop pseudo element selector:
dialog::backdrop background-image: url("backdrop.svg"); background-size: cover;
Mike Worth, designed by Andy Clarke, Stuff & Nonsense.
I needed to make it clear to anyone filling in Mike’s form that their email address is in a valid format. So I combined :has and :valid CSS pseudo-class selectors to change the color of the submit button from grey to green:
dialog:has(input:valid) button background-color: #7e8943; color: #fff;
I also wanted this interaction to reflect Mike’s fun personality. So, I also changed the dialog background image and applied a rubberband animation to the box when someone inputs a valid email address:
dialog:has(input:valid) background-image: url("dialog-valid.svg"); animation: rubberBand 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; @keyframes rubberBand from transform: scale3d(1, 1, 1); 30% transform: scale3d(1.25, 0.75, 1); 40% transform: scale3d(0.75, 1.25, 1); 50% transform: scale3d(1.15, 0.85, 1); 65% transform: scale3d(0.95, 1.05, 1); 75% transform: scale3d(1.05, 0.95, 1); to transform: scale3d(1, 1, 1);
Tip: Daniel Eden’s Animate.css library is a fabulous source of “Just-add-water CSS animations” like the rubberband I used for this dialogue box.
Changing how an element looks when it contains a valid input is a fabulous way to add interactions that are, at the same time, fun and valuable for the user.
Mike Worth, designed by Andy Clarke, Stuff & Nonsense.
That combination of :has and :valid selectors can even be extended to the ::backdrop pseudo-class, to change the backdrop’s background image:
dialog:has(input:valid)::backdrop background-image: url("backdrop-valid.svg");
Try it for yourself:
Conclusion
We often think of dialogue boxes as functional elements, as necessary interruptions, but nothing more. But when you treat them as opportunities for expression, even the smallest parts of a design can help shape a product or website’s personality.
The HTML dialog element, with its built-in behaviours and styling potential, opens up opportunities for branding and creative storytelling. There’s no reason a dialogue box can’t be as distinctive as the rest of your design.
Andy Clarke
Often referred to as one of the pioneers of web design, Andy Clarke has been instrumental in pushing the boundaries of web design and is known for his creative and visually stunning designs. His work has inspired countless designers to explore the full potential of product and website design.
Andy’s written several industry-leading books, including ‘Transcending CSS,’ ‘Hardboiled Web Design,’ and ‘Art Direction for the Web.’ He’s also worked with businesses of all sizes and industries to achieve their goals through design.
Visit Andy’s studio, Stuff & Nonsense, and check out his Contract Killer, the popular web design contract template trusted by thousands of web designers and developers.
#:has#2025#Accessibility#ADD#amp#animation#animations#applications#aria#Art#Article#Articles#Assistive technology#attention#background#background-image#book#Books#border#box#box-shadow#Branding#change#Color#content#CSS#css animations#data#Design#designers
1 note
·
View note
Text

Creative CSS Menu Hover
#css menu hover#pure css animation#css animation tutorial#css animations#html css#codenewbies#pure css tutorial
1 note
·
View note
Text

Split Screen Hover Animation
#split screen hover animation#css animation#css tricks#css effect#css animation tutorial#css animations#cool css animation#html css#codingflicks#frontend#webdesign#learn to code#code#css#html#frontenddevelopment#animation#css hover animation
0 notes
Text
Theme - Allfire; [preview] [code] [magnusthemes] [buy me a coffee?]
A compact, versatile and responsive header theme.
Features:
Full support for NPF posts
Theme is responsive!
Like/reblog buttons
1, 2 or 3 columns of posts
Custom post size from 250px to 540px
Pagination options: Infinite scroll, manual load or pagination
Background image options: Full-size, repeated, none
Header image options: Full-size, compact, none
Change content opacity from 0 to 1
Optional rainbow accents
Notes:
Built with JSON - thanks to @eggdesign's base code!
To insert links into the menu, simply create a page and check “show a link to this page”.
Please turn off the default mobile theme in Advanced Options if you want to use the mobile version!
Subtitle is optional, and you can add icons if you want!
Updates tab is also optional, and you can also add icons if you want!
Icons cheatsheet: here
Full list of credits: here
Please like and/or reblog this post if you use or plan or using this theme, and consider buying a coffee to support me! Thank you c:
#themes#mythemes#tumblr theme#codingcabin#theme hunter#magnusthemes#html#css#fueled by coldplay bts and 2010s anime osts
163 notes
·
View notes
Text

Thinking about these kids again. One of greatest anime love rivals to lovers ever to me. Also here one of my fave artworks of mine from 2023.
#from both of them crushing on the same friend of her older brother to falling for eachother. these kids.. smh#😭❤️#carpet's art#2023#cardcaptor sakura#syaosaku#cardcaptor sakura sakura#Cardcaptor sakura syaoran#Syaoran Li#Sakura Kinomoto#kinomoto sakura#li syaoran#magical girl#ccs sakura#css fanart#cardcaptor sakura fanart#hiddencarpet#mahou shoujo#magical girls#shoujo anime#artists on tumblr#described
249 notes
·
View notes
Text
super happy to share these, i personally adore them...
TRADING CARD(ish) WIDGETS FOR YR SITE OR BLOG OR WHATEVER!!~
FEATURES:
-super cool
-animated af
-mad stylish
-buttons!!!! dynamic effects!!!
DOWNLOAD HERE, AND HERE LIVE PREVIEW ONE, TWO BY NUMBPILLED ON KO-FI (ps if you do end up using these lmk, i wanna see >.>)
#css#cybercore#neocities#old web graphics#neocities template#html#html css#htmlcoding#web graphics#web resources#gif#free widget#widget#neocities resources#carrd resources#rentry decor#rentry graphics#rentry gif#rentry inspo#rentry png#rentry resources#rentry template#trading cards#orrery#celestial#three.js#animation#low poly#neocities themes#neocities theme
156 notes
·
View notes
Text
🍀 Lucky ☆ Theme! 🌺
My first F2U Template that I have uploaded. I hope someone will find this useful!
Please keep in mind that even myself, is amateur at coding. So please, if you find any error, contact me via email ( [email protected] ) I'll be happy to help.
Find the template's code here. It should be easy to understand. If you need any help installing the code, again, send me an email!
:*:・。,☆゚'・:*:・。,ヽ(・∀・)人(・∀・)ノ ,。・:*:・゚'☆,。・:*:
#old web#2000s#old internet#2000s web#anime#2000s anime#webdesign#graphics#web graphics#art#website#web site#site#code#coding#HTML#CSS#neocities#html css#template#f2u#theme#my themes#f2u base#00s#clover#clovers
922 notes
·
View notes
Note
hiya. looks like your comms are closed, but for future reference, do you have any more examples of your websites? thanks in advance
Actually they're open, and yes, i do have more examples, I love making websites as well ... so i been wanting people to do something or req for a comm like this,
these are two of my other examples!
i adore making them, so I'm surprised no one has req it :-)
#⠀⠀ ⠀⠀— art ? or other#old web#2000s#old internet#2000s web#anime#2000s anime#webdesign#graphics#web graphics#art#website#web site#site#code#coding#HTML#CSS#neocities#html css#template#f2u#theme#my themes#f2u base#00s#clover#clovers#neocities stamps#website commission
33 notes
·
View notes
Text
Stickbug Wiki UPDATE!
NOTE: I've noticed on some browsers like Firefox, it takes longer to update and looks BAD at first. I've found if you press "CTRL + SHIFT + R" it helps, but if it doesn't please tell me so I can find a solution.
Introducing
TWO NEW MAJOR UPDATES: featuring the new Rise of Rocket Corp chapter, and the character page for Ochre! These took some time to get out, but I'm so glad to finally have some new writing on the site again.
And while @tatos-stick-pile created just as much for this AU as I have, I really want to thank her again for writing Ochre's page, since Ochre is basically her character and has such an influence over the AU. Enjoy!
Website Link Here & Ao3 Story Port Here!
Full Update List Under Cut
Major Updates:
New Story Chapter: Rise of Rocket Corp
New Character Page: Ochre
Minor Updates:
Downscaled the size of the text when on mobile
2 new additions to Green Screen's gallery
Made the floating figs bigger when on desktop
#my writing#my art#anim vs bf au#animator vs animation#ava#animation vs minecraft#avm#coding#html#css#neocities
36 notes
·
View notes
Text

CSS Social Media Button Hover
#html css#css button hover effects#animated social media buttons#button hover animation css#css animations#css animation tutorial#css animation examples#divinectorweb#code#css#html#css3#webdesign
0 notes
Text
The Lost CSS Tricks of Cohost.org
New Post has been published on https://thedigitalinsider.com/the-lost-css-tricks-of-cohost-org/
The Lost CSS Tricks of Cohost.org
You would be forgiven if you’ve never heard of Cohost.org. The bespoke, Tumblr-like social media website came and went in a flash. Going public in June 2022 with invite-only registrations, Cohost’s peach and maroon landing page promised that it would be “posting, but better.” Just over two years later, in September 2024, the site announced its shutdown, its creators citing burnout and funding problems. Today, its servers are gone for good. Any link to cohost.org redirects to the Wayback Machine’s slow but comprehensive archive.
The landing page for Cohost.org, featuring our beloved eggbug.
Despite its short lifetime, I am confident in saying that Cohost delivered on its promise. This is in no small part due to its user base, consisting mostly of niche internet creatives and their friends — many of whom already considered “posting” to be an art form. These users were attracted to Cohost’s opinionated, anti-capitalist design that set it apart from the mainstream alternatives. The site was free of advertisements and follower counts, all feeds were purely chronological, and the posting interface even supported a subset of HTML.
It was this latter feature that conjured a community of its own. For security reasons, any post using HTML was passed through a sanitizer to remove any malicious or malformed elements. But unlike most websites, Cohost’s sanitizer was remarkably permissive. The vast majority of tags and attributes were allowed — most notably inline CSS styles on arbitrary elements.
Users didn’t take long to grasp the creative opportunities lurking within Cohost’s unassuming “new post” modal. Within 48 hours of going public, the fledgling community had figured out how to post poetry using the <details> tag, port the Apple homepage from 1999, and reimplement a quick-time WarioWare game. We called posts like these “CSS Crimes,” and the people who made them “CSS Criminals.” Without even intending to, the developers of Cohost had created an environment for a CSS community to thrive.
In this post, I’ll show you a few of the hacks we found while trying to push the limits of Cohost’s HTML support. Use these if you dare, lest you too get labelled a CSS criminal.
Width-hacking
Many of the CSS crimes of Cohost were powered by a technique that user @corncycle dubbed “width-hacking.” Using a combination of the <details> element and the CSS calc() function, we can get some pretty wild functionality: combination locks, tile matching games, Zelda-style top-down movement, the list goes on.
If you’ve been around the CSS world for a while, there’s a good chance you’ve been exposed to the old checkbox hack. By combining a checkbox, a label, and creative use of CSS selectors, you can use the toggle functionality of the checkbox to implement all sorts of things. Tabbed areas, push toggles, dropdown menus, etc.
However, because this hack requires CSS selectors, that meant we couldn’t use it on Cohost — remember, we only had inline styles. Instead, we used the relatively new elements <details> and <summary>. These elements provide the same visibility-toggling logic, but now directly in HTML. No weird CSS needed.
These elements work like so: All children of the <details> element are hidden by default, except for the <summary> element. When the summary is clicked, it “opens” the parent details element, causing its children to become visible.
We can add all sorts of styles to these elements to make this example more interesting. Below, I have styled the constituent elements to create the effect of a button that lights up when you click on it.
This is achieved by giving the <summary> element a fixed position and size, a grey background color, and an outset border to make it look like a button. When it’s clicked, a sibling <div> is revealed that covers the <summary> with its own red background and border. Normally, this <div> would block further click events, but I’ve given it the declaration pointer-events: none. Now all clicks pass right on through to the <summary> element underneath, allowing you to turn the button back off.
This is all pretty nifty, but it’s ultimately the same logic as before: something is toggled either on or off. These are only two states. If we want to make games and other gizmos, we might want to represent hundreds to thousands of states.
Width-hacking gives us exactly that. Consider the following example:
In this example, three <details> elements live together in an inline-flex container. Because all the <summary> elements are absolutely-positioned, the width of their respective <details> elements are all zero when they’re closed.
Now, each of these three <details> has a small <div> inside. The first has a child with a width of 1px, the second a child with a width of 2px, and the third a width of 4px. When a <details> element is opened, it reveals its hidden <div>, causing its own width to increase. This increases the width of the inline-flex container. Because the width of the container is the sum of its children, this means its width directly corresponds to the specific <details> elements that are open.
For example, if just the first and third <details> are open, the inline-flex container will have the width 1px + 4px = 5px. Conversely, if the inline-flex container is 2px wide, we can infer that the only open <details> element is the second one. With this trick, we’ve managed to encode all eight states of the three <details> into the width of the container element.
This is pretty cool. Maybe we could use this as an element of some kind of puzzle game? We could show a secret message if the right combination of buttons is checked. But how do we do that? How do we only show the secret message for a specific width of that container div?
In the preceding CodePen, I’ve added a secret message as two nested divs. Currently, this message is always visible — complete with a TODO reminding us to implement the logic to hide it unless the correct combination is set.
You may wonder why we’re using two nested divs for such a simple message. This is because we’ll be hiding the message using a peculiar method: We will make the width of the parent div.secret be zero. Because the overflow: hidden property is used, the child div.message will be clipped, and thus invisible.
Now we’re ready to implement our secret message logic. Thanks to the fact that percentage sizes are relative to the parent, we can use 100% as a stand-in for the parent’s width. We can then construct a complicated CSS calc() formula that is 350px if the container div is our target size, and 0px otherwise. With that, our secret message will be visible only when the center button is active and the others are inactive. Give it a try!
This complicated calc() function that’s controlling the secret div’s width has the following graph:
You can see that it’s a piecewise linear curve, constructed from multiple pieces using min/max. These pieces are placed in just the right spots so that the function maxes out when the container div is 2px— which we’ve established is precisely when only the second button is active.
A surprising variety of games can be implemented using variations on this technique. Here is a tower of Hanoi game I had made that uses both width and height to track the game’s state.
SVG animation
So far, we’ve seen some basic functionality for implementing a game. But what if we want our games to look good? What if we want to add ✨animations?✨ Believe it or not, this is actually possible entirely within inline CSS using the power of SVG.
SVG (Scalable Vector Graphics) is an XML-based image format for storing vector images. It enjoys broad support on the web — you can use it in <img> elements or as the URL of a background-image property, among other things.
Like HTML, an SVG file is a collection of elements. For SVG, these elements are things like <rect>, <circle>, and <text>, to name a few. These elements can have all sorts of properties defined, such as fill color, stroke width, and font family.
A lesser-known feature of SVG is that it can contain <style> blocks for configuring the properties of these elements. In the example below, an SVG is used as the background for a div. Inside that SVG is a <style> block that sets the fillcolor of its <circle> to red.
An even lesser-known feature of SVG is that its styles can use media queries. The size used by those queries is the size of the div it is a background of.
In the following example, we have a resizable <div> with an SVG background. Inside this SVG is a media query which will change the fill color of its <circle> to blue when the width exceeds 100px. Grab the resize handle in its bottom right corner and drag until the circle turns blue.
Because resize handles don’t quite work on mobile, unfortunately, this and the next couple of CodePens are best experienced on desktop.
This is an extremely powerful technique. By mixing it with width-hacking, we could encode the state of a game or gizmo in the width of an SVG background image. This SVG can then show or hide specific elements depending on the corresponding game state via media queries.
But I promised you animations. So, how is that done? Turns out you can use CSS animations within SVGs. By using the CSS transition property, we can make the color of our circle smoothly transition from red to blue.
Amazing! But before you try this yourself, be sure to look at the source code carefully. You’ll notice that I’ve had to add a 1×1px, off-screen element with the ID #hack. This element has a very simple (and nearly unnoticeable) continuous animation applied. A “dummy animation” like this is necessary to get around some web browsers’ buggy detection of SVG animation. Without that hack, our transition property wouldn’t work consistently.
For the fun of it, let’s combine this tech with our previous secret message example. Instead of toggling the secret message’s width between the values of 0px and 350px, I’ve adjusted the calc formula so that the secret message div is normally 350px, and becomes 351px if the right combination is set.
Instead of HTML/CSS, the secret message is now just an SVG background with a <text> element that says “secret message.” Using media queries, we change the transform scale of this <text> to be zero unless the div is 351px. With the transition property applied, we get a smooth transition between these two states.
Click the center button to activate the secret message:
The first cohost user to discover the use of media queries within SVG backgrounds was @ticky for this post. I don’t recall who figured out they could animate, but I used the tech quite extensively for this quiz that tells you what kind of soil you’d like if you were a worm.
Wrapping up
And that’s will be all for now. There are a number of techniques I haven’t touched on — namely the fun antics one can get up to with the resize property. If you’d like to explore the world of CSS crimes further, I’d recommend this great linkdump by YellowAfterlife, or this video retrospective by rebane2001.
It will always hurt to describe Cohost in the past tense. It truly was a magical place, and I don’t think I’ll be able to properly convey what it was like to be there at its peak. The best I can do is share the hacks we came up with: the lost CSS tricks we invented while “posting, but better.”
#2022#2024#ADD#advertisements#amazing#animation#animations#apple#Art#Articles#attributes#background#background-image#Blue#border#burnout#buttons#change#checkbox hack#Children#code#Color#Community#comprehensive#container#continuous#creators#CSS#css animations#css-tricks
0 notes
Text

Replace the Image On hover
#replace image on hover#change image on hover#css change image on hover#html css animation#css animation examples#css animation tutorial#css animations#codenewbies#html#css#html5 css3#frontenddevelopment#pure css animation#html css#code
1 note
·
View note
Text

Split Screen Image Hover Effect
#split screen hover effect#css animation tutorial#css animations#pure css animation#html5#learn to code#html css#code#webdesign#css#html#css3#frontenddevelopment#html5 css3#frontend#css hover effects#css hover animation
0 notes
Text
Hello audience. Unfortunately, I am still on my break. However, I am happy to announce that I am still alive and kicking. In fact, I decided to make use of my unemployment and revisit HTML, CSS, and JavaScript to create... A visual novel.
Good News: code is 100% reusable because I used a JSON (i do not know how that works, someone can kindly explain to me...)
Bad News: this code sucks ass, and NOTHING works except playing the story. Transitions? Doesn't work. UI/UX? Ass. Effects? Hell no... Also, 70% of the features aren't present yet I'm gonna do it later.
Oh, this is CrossDust, if you can't tell.


Dust Sans by Ask-Dusttale, Cross Sans by Jakei
I'm gonna respond to asks and do requests later (After my break is over). This is just a small update teehee.
#dsevalyappuccino#TIME TO GO INSANE IN THE TAGS!!#i hate css#i still hate css#css hell no#guys why is css so hard. ive literally been doing this for months and css is still hard#i was about to use css spritesheets for the sprites and emotions#but my ass gave up and instead i just use seperate images#GUYS!!! DISPLAY: FLEX 💪. DISPLAY: GRID?!?!#javascript i hate you tooq#i hate java script naurrrr#what do you mean DOM objects#what do YOU MEAN#also i do not understand error handling and JSON integrations#papaGPT doesn't explain anything#i don't know what I just wrote#coding???????????#kids don't be unemployed#actually maybe if you're unemployed but still making money that's great#also the sprites are just for testing purposes im probably gonna make new better ones if i chose to expand this into#a full blown anime high school visual novel project#i don't wanna think of all that story crap but then again i can just write the cringiest thing on earth
23 notes
·
View notes
Text
animated sprites of all my sonas for my silly website
#one of these days it will look nice but I literally started learning html and css 2 days ago#my art#toldentops#paloss#soaps#my ocs#fursona#animation#it's so addicting to make these animations. its so easy#pokemo#palossand
171 notes
·
View notes