A Pen by Matheus Sales on CodePen.
Created
March 1, 2020 19:21
-
-
Save para-dise/896737bce1dd822a763b68cb6f4f6d09 to your computer and use it in GitHub Desktop.
Custom Select Wrapper
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
label for='styledSelect1' class='custom-select' | |
select#styledSelect1 name='options' | |
option value='' Select an option | |
option value='1' Option 1 | |
option value='2' Option 2 | |
option value='3' Option 3 | |
option value='4' Option 4 |
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
.custom-select | |
position: relative | |
display: block | |
max-width: 400px | |
min-width: 180px | |
margin: 0 auto | |
border: 1px solid #3C1C78 | |
background-color: #16013E | |
z-index: 10 | |
select | |
border: none | |
outline: none | |
background: transparent | |
-webkit-appearance: none | |
-moz-appearance: none | |
appearance: none | |
border-radius: 0 | |
margin: 0 | |
display: block | |
width: 100% | |
padding: 12px 55px 15px 15px | |
font-size: 14px | |
color: #714BB9 | |
&:after | |
position: absolute | |
right: 0 | |
top: 0 | |
width: 50px | |
height: 100% | |
line-height: 38px | |
content: '\2228' | |
text-align: center | |
color: #714BB9 | |
font-size: 24px | |
border-left: 1px solid #3C1C78 | |
z-index: -1 | |
body | |
margin-top: 80px | |
background-color: #1A004A |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment