Add flag image to select option

后端 未结 1 1490
深忆病人
深忆病人 2021-01-15 03:48

Good day! Im a newbie. Im trying to add image in the option tag in the select. but when i run the code. It doesnt show the image. can someone help me? thank you

This

1条回答
  •  旧巷少年郎
    2021-01-15 04:25

    It's Difficult to Customize and tags are difficult to customize and anything that holds true for one browser is never true for the rest of them.

    Solution

    • Forget about customizing using
      and

       and

     & 

The pseudo- and tags. More importantly, it can store and process a value, and it can be registered to the change event.


Demo

Details are commented in demo

/*| For Demonstration Purposes
This is a test to prove that this pseudo- by logging the value of the selected pseudo-
html,
body {
  font: 400 small-caps 16px/1.25 Arial;
}

fieldset {
  width: fit-content;
  padding: 0;
}

legend {
  font-size: 1rem
}

details {
  width: 150px;
  cursor: pointer;
  margin: 0 4px -5px 0;
  padding: 0 0 0 10px;
}

summary {
  position: relative;
  width: 96%;
  outline: 0.5px ridge grey;
}


/*
Hides 's default arrow
*/

details summary::-webkit-details-marker {
  visibility: hidden;
  position: absolute;
  z-index: -1;
}


/*| Pseudo-
all




  
  Custom select box Jquery Plugin by VJ
  
  



  



 
Country

0 讨论(0)
提交回复
热议问题