how to have text of 2 font sizes in same line in HTML?

前端 未结 3 894
广开言路
广开言路 2021-01-12 02:33

I am developing a front end HTML page using bootstrap and basic HTML code. I need to print price of a particular product say $63. I want this to be in same line but the size

3条回答
  •  情话喂你
    2021-01-12 03:07

     span { font-size: 3em;}
     span b { font-size: 60%; font-weight: normal }
    $63


    You could also avoid to use a nested element to wrap the currency sign and use the ::first-letter pseudoclass to style it, but this requires a block or inline-block parent element, e.g.

    span { 
       font-size: 3em; 
       display: inline-block; }
    
    span::first-letter { font-size: 60%; }
    $63

提交回复
热议问题