MaterialiseCSS卡设计

时间:2015-08-28 03:35:35

标签: html css web material-design materialize

我正在尝试使用materializecss.com在我的个人网站中调整Material Design,但是框架仅提供在CARD设计之上排除其他图像的选项。

我想在主要内容旁边的左侧链接[第2行,第2列/最后图像]中显示如下所示的内容,想知道是否有人可以帮助我,我真的很感激你对此有所帮助。谢谢!

Card Material Design Example

3 个答案:

答案 0 :(得分:1)

@vizFlux

这是您想要的代码

.card-image {
  float: left;
  width: 40%;
  height: 250px;
}
.card-image img {
  height: 100%;
}
.right-content {
  width: 60%;
  float: left;
}
.card-title {
  padding-left: 20px;
}
<div class="card">
  <div class="card-image">
    <img src="images/sample-1.jpg" class="hoverZoomLink">
  </div>
  <div class="right-content">
    <span class="card-title">Card Title</span>
    <div class="card-content">
      <p>I am a very simple card. I am good at containing small bits of information. I am convenient because I require little markup to use effectively.
      </p>
    </div>
    <div class="card-action">
      <a href="#">This is a link</a>
    </div>
  </div>
</div>

输出应该如下所示:

output image

答案 1 :(得分:1)

ViewEncapsulation.None
.card-image {
  float: left;
  width: 40%;
  height: 250px;
}
.card-image img {
  height: 100%;
}
.right-content {
  width: 60%;
  float: left;
}
.card-title {
  padding-left: 20px;
}

答案 2 :(得分:0)

这应该有所帮助 http://materializecss.com/cards.html

  <div class="row">
    <div class="col s12 m7">
      <div class="card">
        <div class="card-image">
          <img src="images/sample-1.jpg">
          <span class="card-title">Card Title</span>
        </div>
        <div class="card-content">
          <p>I am a very simple card. I am good at containing small bits of information.
          I am convenient because I require little markup to use effectively.</p>
        </div>
        <div class="card-action">
          <a href="#">This is a link</a>
        </div>
      </div>
    </div>
  </div>