css select dropdown bold on some

后端 未结 5 1092
迷失自我
迷失自我 2021-02-13 05:30

On a select dropdown, I need to make certain items \'strong/bold\'.

How can I do this?

Example of what I ideally require:

5条回答
  •  猫巷女王i
    2021-02-13 06:19

    You could do it with jQuery.

      $('#Your select').append($("").attr.css("font-weight" , "bold").html("Bold Text"));
    

    You'd have to add some logic to determine which options to bold, obviously.

提交回复
热议问题