本章讨论Media对象.这些是抽象对象样式,用于构建各种类型的组件(如博客评论,推文等),这些组件在文本内容旁边具有左对齐或右对齐图像.媒体对象的目标是使用于开发这些信息块的代码大大缩短.
媒体对象的目标(轻量级标记,易扩展性)是通过将类应用于某些人来实现的.简单标记.媒体对象有两种形式 :
.media : 此类允许将媒体对象(图像,视频和音频)浮动到内容块的左侧或右侧.
.media-列表 : 如果您准备的列表中的项目将成为无序列表的一部分,请使用类.对评论主题或文章列表很有用.
让我们看一下默认媒体对象的下面一个例子 :
Media heading
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.
让我们看一下媒体列表的示例 :
-
Media heading
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.
-
Media heading
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.