Freecodecamp: 単純なcssの問題.thick-green-borderクラスが通過していません。 私は何が間違っているのですか?

作成日 2016年07月01日  ·  3コメント  ·  ソース: freeCodeCamp/freeCodeCamp

チャレンジ要素の周囲に境界線を追加するには問題があります。
ユーザーエージェントは次のとおりです: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0
この問題を再現する方法を説明し、可能であればスクリーンショットへのリンクを含めてください。

私のコード:

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

  h2 {
    font-family: Lobster, Monospace;
  }

  p {
    font-size: 16px;
    font-family: Monospace;
  }

  .smaller-image {
    width: 100px;
  }

  .thick-green-border {
    border-width: 10px;
    border-style: solid;
    border-color: green;
  }
</style>

<h2 class="red-text">CatPhotoApp</h2>

<img class="smaller-image" class="thick-green-border"  src="https://bit.ly/fcc-relaxing-cat">

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

最も参考になるコメント

画像タグに2つのクラス属性を含めることはできません。 実際、html要素に2つのクラス属性を含めることはできません。
複数のクラスをスペースで区切って、html要素に追加します。 例えば、

<h2 class="red-text green-border">Heading</h2>

そして、このスペースは、課題について助けを求めるためのものではありません。 ヘルプが必要な場合は、 FCCヘルプルームにアクセスしてください。

全てのコメント3件

画像タグに2つのクラス属性を含めることはできません。 実際、html要素に2つのクラス属性を含めることはできません。
複数のクラスをスペースで区切って、html要素に追加します。 例えば、

<h2 class="red-text green-border">Heading</h2>

そして、このスペースは、課題について助けを求めるためのものではありません。 ヘルプが必要な場合は、 FCCヘルプルームにアクセスしてください。

簡単なことになると思いました。 どうもありがとうarun1595。

問題が解決したようですので、終了します。 ハッピーコーディング!

このページは役に立ちましたか?
0 / 5 - 0 評価