Angular select with images

后端 未结 5 1313
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-15 13:44

THE SITUATION:

I need to insert flags inside the language select. I have searched in Google and StackOverflow but the solutions founded are not work

5条回答
  •  被撕碎了的回忆
    2021-01-15 14:32

    It's not possible, as

    You may have to roll your own drop-down control using complex HTML/CSS/JavaScript. How to do it may or may not be within the scope of your question.

    Alternatively, you may use a non-repeating background-image and apply some padding on the text to achieve a similar effect. But if each is to have a unique image, your code is going to be polluted with a style attribute for every single . If you don't mind that, it's fine. Otherwise, roll your own somehow.

    Referred from : Adding images with option tag

提交回复
热议问题