Add tick icon when select multiple select option in CSS

Anybody want to add tick icon on the background of the selected option in HTML with CSS. And also want to change color as required.


<link href="" rel="stylesheet">
    .anythinglearn select {width:300px; position:relative;}
  .anythinglearn select[multiple]:focus option:checked {
      background: linear-gradient(0deg, green 0%, green 100%);
    .anythinglearn select[multiple]:focus option:checked::after{font-family:'FontAwesome'; content:'\f00c'; position:absolute; right:0; color:#fff; }


<div class="anythinglearn">
  <select multiple>
    <option value="banana">Banana</option>
    <option value="mango">Mango</option>
    <option value="plum">Plum</option>
    <option value="grapes">Grapes</option>

No comments:

Note: Only a member of this blog may post a comment.

Copyright Reserved to Anything Learn. Powered by Blogger.