css selection
::selection {
background-color: cyan;
}
3.67
3
.custom-select-wrapper {
position: relative;
user-select: none;
width: 100%;
}
.custom-select {
position: relative;
display: flex;
flex-direction: column;
border-width: 0 2px 0 2px;
border-style: solid;
border-color: #394a6d;
}
.custom-select__trigger {
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 22px;
font-size: 20px;
font-weight: 300;
color: #3b3b3b;
height: 60px;
line-height: 60px;
background: #ffffff;
cursor: pointer;
border-width: 2px 0 2px 0;
border-style: solid;
border-color: #394a6d;
}
.custom-options {
position: absolute;
display: block;
top: 100%;
left: 0;
right: 0;
border: 2px solid #394a6d;
border-top: 0;
background: #fff;
transition: all 0.5s;
opacity: 0;
visibility: hidden;
pointer-events: none;
z-index: 2;
}
.custom-select.open .custom-options {
opacity: 1;
visibility: visible;
pointer-events: all;
}
.custom-option {
position: relative;
display: block;
padding: 0 22px 0 22px;
font-size: 22px;
font-weight: 300;
color: #3b3b3b;
line-height: 60px;
cursor: pointer;
transition: all 0.5s;
}
.custom-option:hover {
cursor: pointer;
background-color: #b2b2b2;
}
.custom-option.selected {
color: #ffffff;
background-color: #305c91;
}
Thank you!
3
0
3.8
5
p.normal::selection {
background: #cc0000;
color: #fff;
}
p.moz::-moz-selection {
background: #cc0000;
color: #fff;
}
Thank you!
5
0
Are there any code examples left?
New code examples in category CSS
-
CSS 2022-03-27 22:50:16 make text bigger html5
-
CSS 2022-03-27 21:40:08 move list item to left css
-
CSS 2022-03-27 21:35:05 reduce image size css
-
CSS 2022-03-27 21:30:21 css image background center horizontally in div
-
CSS 2022-03-27 21:05:02 css button styles
-
CSS 2022-03-27 18:50:09 compass font awesome
-
CSS 2022-03-27 18:50:06 modal in materialize css
-
CSS 2022-03-27 17:55:12 box round corner css
-
CSS 2022-03-27 17:45:12 jquery add css
-
CSS 2022-03-27 17:45:01 css image fit in div with aspect ratio