HTML:MaterializeCss:图标部分 - 图像而不是图标?

时间:2015-12-02 19:37:24

标签: html css

我有一个问题:

我正在使用MaterialiseCss中的这个模板:

http://materializecss.com/templates/starter-template/preview.html

如您所见,此页面上有3个图标部分,有三个不同的图标。

我的问题:有没有办法用图像(.png)替换这个图标

这是图标部分中第一个图标的代码:

 <div class="row">
    <div class="col s12 m4">
      <div class="icon-block">
        <h2 class="center light-blue-text"><i class="material-icons">flash_on</i></h2>
        <h5 class="center">Speeds up development</h5>

        <p class="light">We did most of the heavy lifting for you to provide a default stylings that incorporate our custom components. Additionally, we refined animations and transitions to provide a smoother experience for developers.</p>
      </div>
    </div>

我已经尝试过这样:

 <div class="row">
    <div class="col s12 m4">
      <div class="icon-block">
       // HERE IS THE NEW PART 
        <img src="img/pic1.png" height="142" width="142">
        <h5 class="center">Speeds up development</h5>

        <p class="light">We did most of the heavy lifting for you to provide a default stylings that incorporate our custom components. Additionally, we refined animations and transitions to provide a smoother experience for developers.</p>
      </div>
    </div>

但不幸的是,图像没有显示为居中...

0 个答案:

没有答案