Created
March 6, 2023 09:47
-
-
Save nikolailehbrink/e011ceb91ca58ac4e8b04918106a74dd to your computer and use it in GitHub Desktop.
Set custom arrow for HTML Select element with TailwindCSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<select id="language-selector" class="flex p-3 px-12 bg-[95%] border-2 appearance-none border-violet"> | |
<option selected> Deutsch </option> | |
<option> English </option> | |
<option> Français </option> | |
</select> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select { | |
background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment