css attr 利用特殊字体 图片 :before content

html code:

<li data-icon="a" class="col one-third step " id="plan"><h4>Plan</h4></li>

css code:

backgroundnone repeat scroll 0 0 #D3404A;

    border-radius2.67em 2.67em 2.67em 2.67em;
    color#FFFFFF;
    contentattr(data-icon); //图片关键方法
    displayinline-block;
    font-familyfontello;  //图标关键字体
    text-aligncenter;
    text-shadow1px 2px 0 rgba(0, 0, 0, 0.2);
    width2.67em;
http://thehappybit.com/about/
posted @ 2013-06-07 14:11  a fine day  阅读(443)  评论(0编辑  收藏  举报