Setting size for icon in CSS

前端 未结 6 1129
再見小時候
再見小時候 2021-01-31 15:54

I\'m working on JSF, and I\'m using this code to display an error box.

6条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-31 16:41

    you can change the size of an icon using the font size rather than setting the height and width of an icon. Here is how you do it:

    
    

    There are 4 ways to specify the dimensions of the icon.

    px : give fixed pixels to your icon

    em : dimensions with respect to your current font. Say ur current font is 12px then 1.5em will be 18px (12px + 6px).

    pt : stands for points. Mostly used in print media

    % : percentage. Refers to the size of the icon based on its original size.

提交回复
热议问题