Build A Clock With JavaScript
One of the best projects for learning CSS and JavaScript is an analog clock. Creating an analog clock teaches you how to use absolute position and transform in many different ways. It also forces you to learn how to modify your CSS with JavaScript. Lastly, it is a beginner friendly project which makes it perfect for anyone.
In this video we will be covering CSS position, and transform extensively. We will also use CSS variables to make the JavaScript integration much easier. By the end of this quick video you will have a fully functional clock and more importantly increased your CSS and JavaScript skills significantly.
📚 Materials/References:
CSS Position Tutorial: https://youtu.be/jx5jmI0UlXU
GitHub Code: https://github.com/WebDevSimplified/JavaScript-Clock
Code Pen Code: https://codepen.io/WebDevSimplified/pen/WBbyPW
🧠 Concepts Covered:
– How to use CSS variables in JavaScript
– JavaScript date object
– How to use CSS transform to center elements
– How to use CSS transform to rotate elements on an axis
– Using data attributes as selectors in JavaScript
– Basic CSS pseudo element usage
🌎 Find Me Here:
Twitter: https://twitter.com/DevSimplified
GitHub: https://github.com/WebDevSimplified
CodePen: https://codepen.io/WebDevSimplified
#Clock #JavaScript #CSS
source