chowa
Version:
UI component library based on React
167 lines (146 loc) • 3.62 kB
CSS
/**
* @license chowa v1.1.3
*
* Copyright (c) Chowa Techonlogies Co.,Ltd.(http://www.chowa.cn).
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
.cw-carousel {
position: relative;
margin: 0;
padding: 0;
box-sizing: border-box;
width: 100%;
height: 100%; }
.cw-carousel-container {
margin: 0;
padding: 0;
width: 100%;
box-sizing: border-box;
position: relative; }
.cw-carousel-items-wrapper {
margin: 0;
padding: 0;
box-sizing: border-box;
list-style: none;
position: relative;
height: 100%; }
.cw-carousel-item {
margin: 0;
padding: 0;
box-sizing: border-box; }
.cw-carousel-slide .cw-carousel-container {
overflow: hidden; }
.cw-carousel-slide .cw-carousel-items-wrapper {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
width: 100%; }
.cw-carousel-slide .cw-carousel-item {
opacity: 0.3;
width: 100%;
overflow: hidden;
transition: all 0.2s ease-in; }
.cw-carousel-slide .cw-carousel-item-active {
opacity: 1; }
.cw-carousel-fade .cw-carousel-item {
opacity: 0;
transition: all 0.4s ease-in;
position: absolute;
left: 0;
top: 0;
right: 0; }
.cw-carousel-fade .cw-carousel-item-active {
opacity: 1; }
.cw-carousel-smash .cw-carousel-item {
display: flex;
flex-direction: row;
flex-wrap: wrap;
perspective: 700px;
transition: all 0.4s ease-in;
position: absolute;
left: 0;
top: 0;
right: 0;
z-index: 1;
overflow: hidden; }
.cw-carousel-smash .cw-carousel-fragment {
transition: all 0.6s ease-in-out;
transform: translateZ(500px) rotateZ(180deg);
margin: 0;
padding: 0; }
.cw-carousel-smash .cw-carousel-item-active {
z-index: 10;
overflow: visible; }
.cw-carousel-smash .cw-carousel-item-active .cw-carousel-fragment {
transform: translateZ(0) rotateZ(0); }
.cw-carousel-next-btn,
.cw-carousel-pre-btn {
position: absolute;
top: 50%;
width: 36px;
height: 36px;
margin: -18px 0 0 0;
padding: 0;
outline: none;
background-color: rgba(0, 0, 0, 0.3);
border-radius: 50%;
border: none;
font-size: 22px;
line-height: 36px;
text-align: center;
color: #fff;
cursor: pointer;
transition: all 0.2s ease-in;
z-index: 15;
box-sizing: border-box; }
.cw-carousel-next-btn:hover,
.cw-carousel-pre-btn:hover {
background-color: rgba(0, 0, 0, 0.5); }
.cw-carousel-pre-btn {
left: 18px; }
.cw-carousel-next-btn {
right: 18px; }
.cw-carousel-pages {
display: flex;
justify-content: center;
margin: 0;
padding: 0;
box-sizing: border-box;
list-style: none;
z-index: 15; }
.cw-carousel-pages-btn {
margin: 0 4px;
padding: 0;
box-sizing: border-box;
flex: none;
display: flex;
align-items: center; }
.cw-carousel-pages-btn button {
width: 24px;
height: 3px;
border: none;
overflow: hidden;
text-indent: -999px;
transition: all 0.2s ease-in;
outline: none;
box-sizing: border-box;
cursor: pointer; }
.cw-carousel-pages-active {
cursor: not-allowed; }
.cw-carousel-pages-inside {
position: absolute;
left: 0;
right: 0;
bottom: 10px; }
.cw-carousel-pages-inside .cw-carousel-pages-btn button {
background-color: rgba(255, 255, 255, 0.45); }
.cw-carousel-pages-inside .cw-carousel-pages-active button {
background-color: #fff; }
.cw-carousel-pages-outside {
padding: 10px 0; }
.cw-carousel-pages-outside .cw-carousel-pages-btn button {
background-color: rgba(97, 106, 110, 0.45); }
.cw-carousel-pages-outside .cw-carousel-pages-active button {
background-color: #616a6e; }