css jQuery SelectBox插件的默认SCSS样式
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css jQuery SelectBox插件的默认SCSS样式相关的知识,希望对你有一定的参考价值。
// This is the default SCSS styling of jQuery SelectBox
// by Zeshan Ahmed @zeshanshani22
.sbHolder {
width: 100%;
height: 36px;
position: relative;
background: #fff;
.sbSelector {
display: block;
font-weight: normal;
background: #fff;
font-size: 17px;
padding: 9px 13px;
height: 36px;
border: none;
box-shadow: none;
color: #bcbcbc;
border-radius: 0;
line-height: normal;
&:hover {
text-decoration: none;
}
}
.sbToggle {
position: absolute;
right: 11px;
top: 50%;
margin-top: -3px;
@include triangle(11px 5px, #bcbcbc, down);
}
.sbOptions {
position: absolute;
background-color: #fff;
overflow-y: scroll;
overflow-x: hidden;
max-height: 264px !important;
z-index: 100;
list-style: none;
top: 109% !important;
left: 0;
width: 100%;
min-width: 280px;
padding: 0;
margin: 0;
a {
display: block;
color: #bcbcbc;
font-size: 14px;
font-weight: normal;
padding: 9px 13px;
height: 36px;
line-height: normal;
&:hover, .sbActive {
background-color: #e8e8e8;
text-decoration: none;
}
}
li {
padding: 0 !important;
}
}
}
/* SelecBox Styling */
.sbHolder {
position: relative;
background: #fff;
cursor: default;
height: 48px;
float: left;
color: #9c9898;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 100%!important;
font: 15px/30px Helvetica, Arial, sans-serif;
}
.sbSelector {
display: block;
padding: 10px 12px 6px;
text-decoration: none;
color: #9c9898;
border: 1px solid #ffd110;
}
.sbSelector:hover {
text-decoration: none;
}
.sbToggle {
width: 44px;
height: 47px;
background: url(images/select-bg.jpg) no-repeat 50% 50%;
position: absolute;
right: 0;
top: 0;
cursor: pointer;
}
.sbOptions {
width: 100%;
border: 1px solid #ffd110;
border-top: none;
border-width: 1px;
top: 100% !important;
background-color: #fff;
overflow-y: scroll;
overflow-x: hidden;
margin: 0;
position: absolute;
overflow: auto;
background: #fff;
z-index: 2000;
max-height: 130px !important;
}
.sbOptions a {
font: 15px/30px Helvetica, Arial, sans-serif;
text-decoration: none;
color: #9c9898;
padding: 5px 12px;
display: block;
cursor: default;
height: 1%;
}
.sbOptions a:hover,
.sbOptions a.sbActive {
text-decoration: none;
background: #ffd110;
cursor: pointer;
color: #fff;
}
.sbOptions a:hover,
.sbOptions a:focus,
.sbOptions a:active {
outline: none;
}
.sbOptions li {
padding: 0 !important;
}
以上是关于css jQuery SelectBox插件的默认SCSS样式的主要内容,如果未能解决你的问题,请参考以下文章
有没有人用过 jquery 美化下拉列表的插件 jQuery.SelectBox.js ???有问题咨询
使用 jquery.selectbox 时无法设置 SELECT 控件的值
自定义jquery selectbox下拉列表
jQuery插件,可轻松操作和自定义HTML选择
如何修改select的子元素option的默认样式
JavaScript学习总结——jQuery插件开发与发布