Menu
Coddy logo textTech

Fixed values

Lesson 10 of 18 in Coddy's Moving Clouds - HTML/CSS/JS Project course.

Let's move the cloud!

challenge icon

Challenge

Easy

Before we start to move the cloud, let's fix the position and size of the cloud.

Comment the code that set random position and size to the cloud.

In the JS file, target the cloud element and:

  1. Set the left style property to 200px.
  2. Set the  top style property to 200px.
  3. Set the transform style property to scale(0.5).

Also, set the transition style property to "all linear 3s" it will help us animate the cloud later on!

Try it yourself

<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="styles.css">
</head>
    <body>
        <!-- Write HTML code here -->
        <script src="script.js"></script>
    </body>
</html>

All lessons in Moving Clouds - HTML/CSS/JS Project