Setting size for icon in CSS

前端 未结 6 1118
再見小時候
再見小時候 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:37

    You could override the framework CSS (I guess you're using one) and set the size as you want, like this:

    .pnx-msg-icon pnx-icon-msg-warning {
        width: 24px !important;
        height: 24px !important;
    }
    

    The "!important" property will make sure your code has priority to the framework's code. Make sure you are overriding the correct property, I don't know how the framework is working, this is just an example of !important usage.

提交回复
热议问题