@charset "utf-8";

/* 字体大小变量 */
$baseFontSize : 16;//默认字体大小
@function pxToRem( $size ){
	@return $size / $baseFontSize + rem;
}
@function pxToEm( $size ){
	@return $size / $baseFontSize + em;
}


/* 默认字体 */
$font-family-default: Helvetica, "Droid Sans", sans-serif;

/* 自定义字体图标 */
@mixin font-face-custom($font-name){
    font-family: "#{$font-name}";
    src: url('../fonts/#{$font-name}/#{$font-name}.eot'); /* IE9*/
    src: url('../fonts/#{$font-name}/#{$font-name}.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
    url('../fonts/#{$font-name}/#{$font-name}.woff') format('woff'), /* chrome、firefox */
    url('../fonts/#{$font-name}/#{$font-name}.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
    url('../fonts/#{$font-name}/#{$font-name}.svg#iconfont') format('svg'); /* iOS 4.1- */
}
@mixin font-custom($font-name){
    font-family: "#{$font-name}"!important;
    font-style:normal;
    -webkit-font-smoothing: antialiased;
    -webkit-text-stroke-width: 0.2px;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: auto;
}

/* 圆角 */
@mixin bdr($value:3px){
	-webkit-border-radius: $value;
	-moz-border-radius: $value;
	border-radius: $value;
}
@mixin radius($value:3px){
	-webkit-border-radius: $value;
	-moz-border-radius: $value;
	border-radius: $value;
	@include background-clip;
}

/* 旋转 */
@mixin rotate($value:180deg){
  -webkit-transform: rotate($value);
     -moz-transform: rotate($value);
      -ms-transform: rotate($value);
          transform: rotate($value);
}

/* 文字溢出 */
@mixin ellipsis {
    white-space: nowrap;
    overflow: hidden;
    -ms-text-overflow: ellipsis;
    -o-text-overflow: ellipsis;
    text-overflow: ellipsis;
    word-break: normal;/* ie8，ie9 bug */
}

/* Clearfix */
@mixin clearfix{
	*zoom: 1;
	&:before,
	&:after{
		content: "";
		display: table;
		line-height: 0;
	}
	&:after{
		clear: both;
	}
}
%clearfix{
	&:before,&:after{
		content:"";display: table;
	}
	&:after{
		clear:both;
	}
	*zoom: 1;
}

/* 弹性盒子webkit-box */
@mixin webkitbox( $type : 1 ){
  display: -webkit-box;
  @if $type == 1{ -webkit-box-orient: horizontal; }//水平
  @if $type == 2{ -webkit-box-orient: vertical; }//垂直
}
@mixin flex($flex){//设置盒子大小
  -webkit-box-flex: $flex;
}

/* 渐变背景Gradients */
@mixin gradient($color-form, $color-to) {
  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,$color-form), color-stop(100%,$color-to)); // Chrome,Safari4+
  background-image: -webkit-linear-gradient(top, $color-form 0%, $color-to 100%); // Chrome10+,Safari5.1+
  background-image: linear-gradient(to bottom, $color-form 0%, $color-to 100%); // W3C
}

@mixin horizontal-gradient ( $from:#FFFFFF, $to:#000000 ) {// 水平渐变
	background-color: $start;
	background-image: -webkit-gradient(linear, left top, right top, from($from), to($to));
	background-image: -webkit-linear-gradient(left, $from, $to);
	background-image:         linear-gradient(left, $from, $to);
}


/* 透明opacity */
@mixin opacity ( $value:1 ) {
	$ieOpacity: $value * 100;
	filter: alpha(opacity=#{$ieOpacity});
	opacity: $value;
}

/* 背景裁剪background-clip */
@mixin background-clip ( $area:padding-box ){
    -webkit-background-clip: $area;
            background-clip: $area;
}

/* 背景大小background-size */
@mixin bgsize ( $x:100%, $y:100% ) {
	-webkit-background-size: $x $y;
	        background-size: $x $y;
}

/* css角标 */
@mixin u-arrow-left($value:6px,$bordercolor:#fff){
  border-width: $value;
  border-color: transparent $bordercolor transparent transparent;
  border-style: solid;
}

@mixin u-arrow-right($value:6px,$bordercolor:#fff){
  border-width: $value;
  border-color: transparent transparent transparent $bordercolor;
  border-style: solid;
}

@mixin u-arrow-top($value:6px,$bordercolor:#fff){
  border-width: $value;
  border-color: transparent transparent $bordercolor transparent;
  border-style: solid;
}

@mixin u-arrow-bottom($value:6px,$bordercolor:#fff){
  border-width: $value $value 0;
  border-color: $bordercolor transparent transparent transparent;
  border-style: solid dashed dashed dashed;
}

/* Chevron */
@mixin chevron-left{
	&:before{
		content: "";
		position: absolute;
		top: 50%;
		right: 0px;
		height: 2px;
		width: 8px;
		background-color: #666666;
		margin-top: -3px;
		@include rotate(45deg);
	}
	&:after{
		content: "";
		position: absolute;
		bottom: 50%;
		right: 0px;
		height: 2px;
		width: 8px;
		margin-bottom: -3px;
		background-color: #666666;
		@include rotate(-45deg);
	}
}

@mixin chevron-right{
	&:before{
		content: "";
		position: absolute;
		top: 50%;
		right: 0px;
		height: 2px;
		width: 8px;
		background-color: #666666;
		margin-top: -3px;
		@include rotate(45deg);
	}
	&:after{
		content: "";
		position: absolute;
		bottom: 50%;
		right: 0px;
		height: 2px;
		width: 8px;
		margin-bottom: -3px;
		background-color: #666666;
		@include rotate(-45deg);
	}
}


/* 动画animation */

.animation{
	-webkit-animation-duration: .5s;
	-webkit-animation-fill-mode: both;
	animation-fill-mode: both;
}





