マルチメディアオブジェクトのブートストラップ
この章では、我々はブートストラップマルチメディアオブジェクトについて説明します。 これらの抽象オブジェクトスタイルがコンポーネントのタイプ(例:ブログのコメント)の様々なために推奨され、私たちは、コンポーネント内の写真・テキストを使用することができ、画像が詰め詰めまたは左右することができます。 メディアオブジェクトは、マルチメディアオブジェクトおよびテキストのスクランブルを実装するために以下のコードを使用することができます。
あなたは、メディアオブジェクトを設定するには、HTMLタグ、次の2つのフォームを追加することができます。
- .media:このクラスは、右または左にコンテンツブロックにマルチメディア(画像、ビデオ)フロートにメディアオブジェクトを可能にします。
- .mediaリスト:あなたは様々な要素のリストは順不同リストの一部である必要がある場合は、クラスを使用することができます。 コメントが一覧表示や記事のリストに使用することができます。
今、私たちは.mediaクラスマルチメディアオブジェクトの使用例を見てみましょう:
<div class="media"> <a class="pull-left" href="#"> <img class="media-object" src="../bootstrap/images/64.jpg" alt="Media Object"> </a> <div class="media-body"> <h4 class="media-heading">Media heading</h4> This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. </div> </div> <div class="media"> <a class="pull-left" href="#"> <img class="media-object" src="../bootstrap/images/64.jpg" alt="Media Object"> </a> <div class="media-body"> <h4 class="media-heading">Media heading</h4> This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. <div class="media"> <a class="pull-left" href="#"> <img class="media-object" src="../bootstrap/images/64.jpg" alt="Media Object"> </a> <div class="media-body"> <h4 class="media-heading">Media heading</h4> This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. </div> </div> </div> </div>
上記の例は、次の効果を示します。
今、私たちは、マルチメディアの使用例を見てみましょう.mediaリストオブジェクトクラス:
<ul class="media-list"> <li class="media"> <a class="pull-left" href="#"> <img class="media-object" src="../bootstrap/images/64.jpg" alt="Generic placeholder image"> </a> <div class="media-body"> <h4 class="media-heading">Media heading</h4> <p>This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text.</p> <!-- Nested media object --> <div class="media"> <a class="pull-left" href="#"> <img class="media-object" src="../bootstrap/images/64.jpg" alt="Generic placeholder image"> </a> <div class="media-body"> <h4 class="media-heading">Nested media heading</h4> This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. <!-- Nested media object --> <div class="media"> <a class="pull-left" href="#"> <img class="media-object" src="../bootstrap/images/64.jpg" alt="Generic placeholder image"> </a> <div class="media-body"> <h4 class="media-heading">Nested media heading</h4> This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. </div> </div> </div> </div> <!-- Nested media object --> <div class="media"> <a class="pull-left" href="#"> <img class="media-object" src="../bootstrap/images/64.jpg" alt="Generic placeholder image"> </a> <div class="media-body"> <h4 class="media-heading">Nested media heading</h4> This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. </div> </div> </div> </li> <li class="media"> <a class="pull-right" href="#"> <img class="media-object" src="../bootstrap/images/64.jpg" alt="Generic placeholder image"> </a> <div class="media-body"> <h4 class="media-heading">Media heading</h4> This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. This is some sample text. </div> </li> </ul>
上記の例は、次の効果を示します。