Codrops Playground

#cssref appearance by huijing

HTML

8
 
1
<div class="select-wrapper">
2
  <select>
3
    <option>Athletics</option>
4
    <option>Basketball</option>
5
    <option>Diving</option>
6
    <option>Gymnastics</option>
7
  </select>
8
</div>

CSS

30
 
1
select {
2
  -webkit-appearance: none;
3
  -moz-appearance: none;
4
  appearance: none;
5
  background: -webkit-linear-gradient(left, #ffbfbf 0%, #ffe6bf 13%, #fffcbf 27%, #c6ffbf 41%, #bffffd 57%, #bfc7ff 71%, #e8bfff 86%, #ffbfd7 100%);
6
  background: linear-gradient(to right, #ffbfbf 0%, #ffe6bf 13%, #fffcbf 27%, #c6ffbf 41%, #bffffd 57%, #bfc7ff 71%, #e8bfff 86%, #ffbfd7 100%);
7
  border-radius: 0;
8
  border: 2px solid darkslategrey;
9
  cursor: pointer;
10
  font-size: 1.2em;
11
  padding: 0.25em 1em 0.25em 0.25em;
12
}
13
14
.select-wrapper {
15
  display: inline-block;
16
  position: relative;
17
}
18
19
.select-wrapper:after {
20
  content: '';
21
  width: 0;
22
  position: absolute;
23
  right: 7px;
24
  top: 50%;
25
  margin-top: -3px;
26
  border-width: 6px 4px;
27
  border-style: solid;
28
  pointer-events: none;
29
  border-color: darkslategrey transparent transparent transparent;
30
}

JS

1
 
1

#cssref appearance

by huijing on

Demo for the Codrops CSS Reference entry appearance

Codrops Logo Codrops Playground

Version 0.0.9 (alpha)

Codrops Playground is currently in development with many features to come, including mobile support. We are in alpha stage right now, so if you find a bug, please send a mail to playground@codrops.com or use the contact form on Codrops.

If you'd like to stay updated, follow us on Twitter @codrops. Thank you and stay tuned :)