m_dropdown.less 1.36 KB
/*
* use      :  .m-dropdown;
*/


@import "var";

.m-dropdown{
	display: inline-block;
	line-height: 30px;
	overflow: visible;
	.current{
		font-size: 14px;
		color: #FFF;
		position: relative;
		display: inline-block;
		padding: 0 25px 0 10px;
		cursor: pointer;
		&:after{
			content: '';
			position: absolute;
			right: 7px;
			top: 50%;
			width: 11px;
			height: 7px;
			cursor: pointer;
			margin-top: -3px;
			background: url("@{imgURI}icon.png") -121px -206px no-repeat;
			background-size: 150px;
		}
	}
	.dropdown-items{
		background: rgba(0, 0, 0, .8);
		position: absolute;
		top: 40px;
		border-radius: 3px;
		min-width: 85px;
		display: none;
		&:before{
			content: '';
			position: absolute;
			top: -16px;
			left: 17px;
			width: 0;
			height: 0;
			font-size: 0;
			overflow: hidden;
			border: 8px solid rgba(0, 0, 0, .8);
			border-color: transparent transparent rgba(0, 0, 0, .8) transparent;
		}
		.item{
			display: block;
			line-height: 45px;
			border-bottom: 1px solid #666;
			text-align: left;
			color: #EEE;
			a{
				padding: 0 15px;
				font-size: 14px;
				display: inline-block;
				color: #EEE;
			}
			&:first-child{
				border-top-left-radius: 3px;
				border-top-right-radius: 3px;
			}
			&:last-child{
				border: none;
				border-bottom-left-radius: 3px;
				border-bottom-right-radius: 3px;
			}
			.m-icon{
				margin-right: 5px;
			}
		}
	}
}