Monday, December 14, 2015

The simplest way to add custom icon in Ionic app

This way we don't need to generate the font file.

CSS:
.tab-icon-home {
    display: inline-block;
    mask: url('../img/tab/icon_home.svg') no-repeat center;
    -webkit-mask: url('../img/tab/icon_home.svg') no-repeat center;
    mask-size: 32px;
    -webkit-mask-size: 32px;
    background-color: #929292;
}

.tab-active i {
    background-color: #03A9F4;
}

a.tab-active {
    color: #03A9F4;
}

HTML:

    
    Home

No comments:

Post a Comment