Skip to content

Instantly share code, notes, and snippets.

@cristianstan
Last active October 22, 2020 13:30
Show Gist options
  • Save cristianstan/2be8a668ee87bc0a0f4e7f990ae334c6 to your computer and use it in GitHub Desktop.
Save cristianstan/2be8a668ee87bc0a0f4e7f990ae334c6 to your computer and use it in GitHub Desktop.
Custom select dropdown arrow pure CSS (https://i.imgur.com/J4Bz8Kf.png)
select {
background-image: linear-gradient( 45deg,transparent 50%,gray 0),linear-gradient( 135deg,gray 50%,transparent 0),linear-gradient( 90deg,#ccc,#ccc);
background-position: calc(100% - 18px) calc(1em + 1px),calc(100% - 13px) calc(1em + 1px),calc(100% - 2.5em) .5em;
background-size: 6px 5px,6px 5px,0 1.5em;
width: 100%;
background-repeat: no-repeat;
appearance: none !important;
-moz-appearance: none !important;
-o-appearance: none !important;
-webkit-appearance: none !important;
padding: 8px 16px;
}
/* Result: https://i.imgur.com/J4Bz8Kf.png */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment