123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252 |
- @charset "utf-8";
- /*
- * @file: 图片轮播基础UI组件
- * @update: 2015-06-30 17:46:06
- */
-
- /*
- * 默认图片轮播
- * @base
- */
- $img-width: 1000px; // 图片宽度
- $img-height: 300px; // 图片高度
- .ui-slide {
- position: relative;
- width: $img-width;
- overflow: hidden;
- img {
- width: 100%;
- height: 100%;
- }
- }
- .ui-slide__content {
- position: relative;
- height: $img-height;
- }
- .ui-slide__panel {
- position: absolute;
- width: $img-width;
- height: $img-height;
- overflow: hidden;
- a {
- display: block;
- }
- }
- .ui-slide__mask {
- position: absolute;
- bottom: 0;
- right: 0;
- width: 100%;
- height: 100%;
- overflow: hidden;
- // padding: 10px 0;
- text-indent: 10px;
- font-size: 20px;
- line-height: 20px;
- color: #fff;
- @include transparent(#000, .5, true);
- }
- .ui-slide__prev,
- .ui-slide__next {
- position: absolute;
- top: 50%;
- cursor: pointer;
- // @include transparent(#000, .3, true);
- .ui-icon {
- font-size: 24px;
- color: #fff;
- }
- &:hover {
- // @include transparent(#000, .6, true);
- }
- }
- .ui-slide__prev {
- left: 0;
- }
- .ui-slide__next {
- right: 0;
- }
- /*
- * 点状导航的图片轮播
- * @extend: dotted
- */
- .ui-slide {
- &.ext-dotted {
- .ui-slide__nav {
- position: absolute;
- bottom: 15px;
- z-index: 99;
- width: 100%;
- text-align: center;
- font-size: 0; /* 所有浏览器 */
- *word-spacing: -1px; /* IE6/7 */
- }
- .ui-slide__trigger {
- @include inline-block;
- vertical-align: top;
- font-size: 12px;
- letter-spacing: normal;
- word-spacing: normal;
-
- width: 10px;
- height: 0;
- padding-top: 10px;
- cursor: pointer;
- overflow: hidden;
- border-radius: 50%;
- margin-left: 4px;
- margin-right: 4px;
- background-color: #ccc;
- &.is-active {
- background-color: #ff6c00;
- }
- }
- }
- }
- @media (-webkit-min-device-pixel-ratio:0) {
- .ui-slide.ext-dotted .ui-slide__nav {
- letter-spacing: -5px; /* Safari 5- 等不支持 font-size: 0 的浏览器*/
- }
- }
- /*
- * 缩略图导航公共部分
- * @extend: thumbX/thumbY
- */
- $active-border-width: 3px; // 激活项边框宽度
- $active-border-color: #288ad6; // 激活项边框颜色
- .ui-slide {
- &.ext-thumbX,
- &.ext-thumbY {
- .ui-slide__trigger {
- &.is-active {
- .ui-slide__thumbMask {
- border: $active-border-width solid $active-border-color;
- background: 0 0;
- @include opacity(1, true);
- }
- &::after {
- content: "";
- position: absolute;
- width: 0;
- height: 0;
- border-width: 8px;
- border-style: solid;
- }
- }
- }
- }
- }
- .ui-slide__thumbMask {
- position: absolute;
- top: 0;
- left: 0;
- display: block;
- background: #fff;
- @include opacity(.1, true);
- }
-
- /*
- * 横向缩略图导航
- * @extend: thumbX
- */
- $thumb-x-width: 170px; // 缩略图宽度
- $thumb-x-height: 94px; // 缩略图高度
- $thumb-x-spacing: 20px; // 缩略图间距
- .ui-slide {
- &.ext-thumbX {
- .ui-slide__nav {
- @include clearfix;
- padding-top: 15px;
- margin-right: -$thumb-x-spacing;
- }
- .ui-slide__trigger {
- position: relative;
- float: left;
- margin-right: $thumb-x-spacing;
- width: $thumb-x-width;
- height: $thumb-x-height;
- cursor: pointer;
- &.is-active {
- .ui-slide__thumbMask {
- width: $thumb-x-width - 2*$active-border-width;
- height: $thumb-x-height - 2*$active-border-width;
- }
- &::after {
- top: -16px;
- left: 50%;
- margin-left: -8px;
- border-color: transparent transparent $active-border-color;
- }
- }
- }
- .ui-slide__thumbMask {
- width: $thumb-x-width;
- height: $thumb-x-height;
- }
- }
- }
- /*
- * 纵向缩略图导航
- * @extend: thumbY
- */
- $img-y-width: 555px; // 图片宽度
- $img-y-height: 300px; // 图片高度
- $thumb-y-width: 170px; // 缩略图宽度
- $thumb-y-height: 90px; // 缩略图高度
- $thumb-y-spacing: 15px; // 缩略图间距
- .ui-slide {
- &.ext-thumbY {
- height: $img-y-height;
- .ui-slide__content {
- float: left;
- width: $img-y-width;
- height: $img-y-height;
- }
- .ui-slide__panel {
- width: $img-y-width;
- height: $img-y-height;
- }
- .ui-slide__nav {
- overflow: hidden;
- zoom: 1;
- padding-left: 15px;
- margin-bottom: -$thumb-y-spacing;
- }
- .ui-slide__trigger {
- position: relative;
- float: left;
- margin-bottom: $thumb-y-spacing;
- width: $thumb-y-width;
- height: $thumb-y-height;
- cursor: pointer;
- &.is-active {
- .ui-slide__thumbMask {
- width: $thumb-y-width - 2*$active-border-width;
- height: $thumb-y-height - 2*$active-border-width;
- }
- &::after {
- left: -16px;
- top: 50%;
- margin-top: -8px;
- border-color: transparent $active-border-color transparent transparent;
- }
- }
- }
- .ui-slide__thumbMask {
- width: $thumb-y-width;
- height: $thumb-y-height;
- }
- }
- }
|