如何在html中并排放置四个图标?

时间:2017-03-16 10:23:18

标签: html5 css3

我有一个图标,我想要使用最小css并排放置四个这样的图标

这是我的HTML代码: -

<span class="fa-stack fa-2x" style="margin-left: 32%;margin-top: -13px;">
            <i class="fa fa-square-o fa-stack-2x"></i>
            <div style="position: absolute;font-size:1.4vw;margin-left:40%">1</div>                                          
         </span>

1 个答案:

答案 0 :(得分:0)

您可以尝试以下内容:

&#13;
&#13;
i.fa.fa-square-o.multi-4x:after {
  content:"\f096\f096\f096";
}
&#13;
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<span class="fa-stack fa-2x" style="margin-left: 32%;margin-top: -13px;">
  <i class="fa fa-square-o fa-stack-2x multi-4x"></i>
  <div style="position: absolute;font-size:1.4vw;margin-left:40%">1</div>    
</span>
&#13;
&#13;
&#13;