画像のサイズを変更するのところ

何が起きているか説明してください:
こちらに問題の詳細を記入してください。
わかりません。助けてください。

  **現状のあなたのコード**

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
  color: red;
}

 .smaller-image {
   width: 100px;
 }
 
h2 {
  font-family: Lobster, monospace;
}

p {
  font-size: 16px;
  font-family: monospace;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>
<main>
<p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>

<a href="#"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>

<div>
  <p>Things cats love:</p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
</div>

<form action="https://freecatphotoapp.com/submit-cat-photo">
  <label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
  <label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
  <label><input type="checkbox" name="personality" checked> Loving</label>
  <label><input type="checkbox" name="personality"> Lazy</label>
  <label><input type="checkbox" name="personality"> Energetic</label><br>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
</form>
</main>
  **あなたのブラウザ情報:**

ユーザーエージェント: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36

チャレンジ: 画像のサイズを変更する

チャレンジへのリンク:

You were given two instructions:

  1. smaller-image というクラスを作成し (Create a class called smaller-image)

  2. それを使用して画像のサイズを幅 100 ピクセルに変更してください (Use it to resize the image to a width of 100 pixels)

You did the first but you didn’t do the second.

You learned how to apply classes in this lesson.

投稿ありがとうございます!

上で kevinSmith さんが書いてくださっている通りですね。

このチャレンジで指示されていることは2つあります。

  1. smaller-image というクラスを作成し
  2. それを使用して画像のサイズを幅 100 ピクセルに変更してください

1つめはできています。ですが、2つめがまだのようです。

作成したクラスをHTML要素に適用する方法は、上のコメントでKevinさんがリンクを貼ってくださっているチャレンジを参考にしてみてください。

上記を試しても上手くいかない場合は、どこが分からないか、どんなことが起きていて上手くいかないか、もう少し詳しく教えてください。 :slight_smile:
あと一歩です!がんばってください :+1:

何とか出来ました。ありがとうございました。

2022年3月21日(月) 18:58 Yoko Matsuda via The freeCodeCamp Forum <notifications@freecodecamp.discoursemail.com>:

1 Like