Creating a Clock with the New CSS sin() and cos() Trigonometry Functions

CSS trigonometry functions are here! Well, they are if you’re using the latest versions of Firefox and Safari, that is. Having this sort of mathematical power in CSS opens up a whole bunch of possibilities. In this tutorial, I thought …


Creating a Clock with the New CSS sin() and cos() Trigonometry Functions originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

https://css-tricks.com/creating-a-clock-with-the-new-css-sin-and-cos-trigonometry-functions/

Created 2y | Mar 8, 2023, 3:21:16 PM


Login to add comment

Other posts in this group

The Mistakes of CSS

All of the things that the CSS Working Group would change if they had a time-traveling Delorean to go back and do things over.


Jan 30, 2025, 4:40:05 PM | CSS tricks
What on Earth is the `types` Descriptor in View Transitions?

The @view-transition at-rule has two descriptions. One is the commonly used navigation descriptor. The second is types, the lesser-known of the two, and one t

Jan 29, 2025, 3:10:17 PM | CSS tricks
Revisiting CSS Multi-Column Layout

After 20 years since Andy Clarke first published his book about Multi-Column Layout in CSS, he's back to encourage a fresh look at CSS columns for enhanced readability and design flexibility.

<

Jan 27, 2025, 4:50:07 PM | CSS tricks
Positioning Text Around Elements With CSS Offset

When it comes to positioning elements on a page, including text, there are many ways to go about it in CSS — the literal position property with corresponding inset-* prope

Jan 24, 2025, 4:50:19 PM | CSS tricks
Some Things You Might Not Know About Custom Counter Styles

I was reading through Juan’s recent Almanac entry for the @counter-style at-rule and I’ll be darned if he didn’t uncover and unpack some extremely interesting things

Jan 23, 2025, 5:40:29 PM | CSS tricks
Creating a “Starred” Feed

Chris wrote about “Likes” pages a long while back. The idea is rather simple: “Like” an item in your RSS reader and dis

Jan 21, 2025, 2:40:17 PM | CSS tricks
Fancy Menu Navigation Using Anchor Positioning

Anchor positioning can be great for little interactive effects — as Temani Afif shows off with this clever idea for a menu hover.


Jan 17, 2025, 3:40:06 PM | CSS tricks