使物化卡可选

时间:2018-01-18 14:32:19

标签: html angularjs materialize

有没有办法让每张卡都可以选择?我只使用html,目前实现,但应用程序也是有角度的。

  <div class="row">
    <div class="col s12 m4">
      <div class="card">
        <div class="card-image">
          <img src="./assets/SVSunset.jpg">
          <span class="card-title">Agenda</span>
          <a class="btn-floating halfway-fab waves-effect waves-light red"><i class="material-icons">add</i></a>
        </div>
        <div class="card-content">
          <p>Whats happening when and where</p>
        </div>
      </div>
    </div>
    <div class="col s12 m4">
      <div class="card">
        <div class="card-image">
          <img src="./assets/SVSunset.jpg">
          <span class="card-title">Map</span>
        </div>
        <div class="card-content">
          <p>Map with markers for church, reception etc</p>
        </div>
      </div>
    </div>
    <div class="col s12 m4">
      <div class="card">
        <div class="card-image">
          <img src="./assets/SVSunset.jpg">
          <span class="card-title">Confetti</span>
        </div>
        <div class="card-content">
          <p>DIY some eco friendly confetti :)</p>
        </div>
      </div>
    </div>
  </div>

任何帮助都会很棒。感谢

1 个答案:

答案 0 :(得分:0)

好的,所以这比我想象的更容易<a href="">围绕卡片div,如下所示:

  <div class="row">
    <div class="col s12 m4">
      <a href="https://stackoverflow.com">
        <div class="card">
        <div class="card-image">
          <img src="./assets/SVSunset.jpg">
          <span class="card-title">Agenda</span>
        </div>
        <div class="card-content">
          <p>Whats happening when and where</p>
        </div>
      </div>
      </a>
    </div>
    <div class="col s12 m4">
      <a href="https://stackoverflow.com">
        <div class="card">
        <div class="card-image">
          <img src="./assets/SVSunset.jpg">
          <span class="card-title">Map</span>
        </div>
        <div class="card-content">
          <p>Map with markers for church, reception etc</p>
        </div>
      </div>
      </a>
    </div>
    <div class="col s12 m4">
      <a href="https://stackoverflow.com">
        <div class="card">
        <div class="card-image">
          <img src="./assets/SVSunset.jpg">
          <span class="card-title">Confetti</span>
        </div>
        <div class="card-content">
          <p>DIY some eco friendly confetti :)</p>
        </div>
      </div>
      </a>
    </div>
  </div>
  <div class="row">