Back to Freecodecamp

Step 13

curriculum/challenges/english/blocks/workshop-greeting-card/67332fff82eb28128f08ec2c.md

latest1.7 KB
Original Source

--description--

The transform property can transform the element look. For example, giving it a value of scale(0.9) would make the element 10% smaller.

css
p {
  transform: scale(0.9);
}

Add a transform property to the .card:hover selector and set to scale(1.1).

--hints--

The .card:hover selector should have transform: scale(1.1).

js
assert.strictEqual(new __helpers.CSSHelp(document).getStyle(".card:hover")?.getPropertyValue("transform"), "scale(1.1)");

--seed--

--seed-contents--

html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Greeting Card</title>
    <link href="styles.css" rel="stylesheet">
  </head>
  <body>
    <div class="card" id="greeting-card">
      <h1>Happy Birthday!</h1>
      <p class="message">
        Wishing you all the happiness and joy on your special day!
      </p>
      <div class="card-links">
        <a href="#send" class="send-link">Send Card</a>
        <a href="#share" class="share-link">Share on Social Media</a>
      </div>
  	</div>
    <section id="send">
      <h2>Sending your card...</h2>
      <p>Card successfully sent to your recipient!</p>
    </section>
    <section id="share">
      <h2>Sharing your card...</h2>
      <p>Your card was shared on social media!</p>
    </section>
  </body>
</html>
css
body {
  font-family: Arial, sans-serif;
  padding: 40px;
  text-align: center;
  background-color: brown;
}

.card {
  background-color: white;
  max-width: 400px;
  padding: 40px;
  margin: 0 auto;
  border-radius: 10px;
  box-shadow: 0 4px 8px gray;
}

.card:hover {
  background-color: khaki;
--fcc-editable-region--
  
--fcc-editable-region--
}