yu.css.ui
Version:
纯CSS通用UI模块和组件
99 lines (98 loc) • 2.67 kB
CSS
.yu-carousel {
position: relative; }
.yu-carousel .container {
width: 100%;
overflow: hidden;
position: relative;
height: 200px; }
.yu-carousel .container .item {
position: absolute;
height: 200px;
width: 100%;
background: #409EFF;
transition: all 0.8s ease; }
.yu-carousel .navigation {
padding-inline-start: 0;
padding: 0;
display: flex;
align-items: center;
position: absolute;
bottom: 10px;
left: 50%;
transform: translateX(-50%); }
.yu-carousel .navigation > li {
list-style: none; }
.yu-carousel .navigation.line li {
width: 20px;
height: 4px;
border-radius: 2px;
background-color: #E4E7ED;
margin: 0 4px;
transition: all 0.4s linear; }
.yu-carousel .navigation.line li.active {
width: 30px;
background-color: #fff; }
.yu-carousel .navigation.circle li {
width: 6px;
height: 6px;
border-radius: 6px;
background-color: #E4E7ED;
margin: 0 4px;
transition: all 0.4s linear; }
.yu-carousel .navigation.circle li.active {
width: 8px;
height: 8px;
border-radius: 8px;
background-color: #fff; }
.yu-carousel .left-button, .yu-carousel .right-button {
position: absolute;
width: 30px;
height: 30px;
border-radius: 30px;
background-color: #E4E7ED;
color: #409EFF;
line-height: 30px;
text-align: center; }
.yu-carousel .left-button {
top: 50%;
transform: translateY(-50%);
left: 20px; }
.yu-carousel .right-button {
top: 50%;
transform: translateY(-50%);
right: 20px; }
.yu-carousel.vertical .navigation {
display: block;
width: 10px;
margin: 0;
padding-inline-start: 0;
padding: 0;
position: absolute;
left: 100%;
top: 50%;
transform: translate(-30px, -50%); }
.yu-carousel.vertical .navigation > li {
list-style: none; }
.yu-carousel.vertical .navigation.line li {
display: block;
width: 4px;
height: 20px;
border-radius: 2px;
background-color: #E4E7ED;
margin: 4px 0;
transition: all 0.4s linear; }
.yu-carousel.vertical .navigation.line li.active {
height: 30px;
background-color: #fff; }
.yu-carousel.vertical .navigation.circle li {
width: 6px;
height: 6px;
border-radius: 6px;
background-color: #E4E7ED;
margin: 4px 0;
transition: all 0.4s linear; }
.yu-carousel.vertical .navigation.circle li.active {
width: 8px;
height: 8px;
border-radius: 8px;
background-color: #fff; }