unika-components
Version:
Unika Vue3 components library
828 lines (752 loc) • 15.6 kB
CSS
.ele-text {
position: relative;
}
.ele-text .ani-wrap {
width: 100%;
height: 100%;
}
.text-common {
padding: 5px;
text-orientation: upright;
white-space: pre-wrap;
}
/* 文本动画类 */
.text-fadeIn {
animation: fadeIn 1s ease-in-out;
}
.text-slideIn {
animation: slideIn 1s ease-in-out;
}
.text-bounceIn {
animation: bounceIn 1s ease-in-out;
}
/* 基础动画关键帧 */
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes slideIn {
from {
transform: translateY(20px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
@keyframes bounceIn {
0% {
transform: scale(0.3);
opacity: 0;
}
50% {
transform: scale(1.05);
opacity: 0.8;
}
70% {
transform: scale(0.9);
opacity: 0.9;
}
100% {
transform: scale(1);
opacity: 1;
}
}
.uni-image-component {
max-width: 100%;
}
.uni-image-mask-wrapper {
display: inline-block;
}
.uni-calendar-component {
}
.slot-number {
position: absolute;
bottom: 2px;
left: 7px;
font-size: 12px;
color: #666
}
.uni-video-component {
position: relative;
text-align: center;
}
.play-pause-button {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
cursor: pointer;
font-size: 2rem;
color: #fff;
background: rgba(0, 0, 0, 0.6);
border-radius: 50%;
padding: 10px;
transition: background 0.3s;
}
.play-pause-button:hover {
background: rgba(0, 0, 0, 0.8);
}
.work-container {
position: relative;
overflow: hidden;
touch-action: pan-y pinch-zoom;
}
.pages-wrapper {
position: relative;
width: 100%;
height: 100%;
}
.pages-wrapper.scroll-mode {
overflow-y: auto;
overflow-x: hidden;
-webkit-overflow-scrolling: touch;
}
.page-container {
position: absolute;
width: 100%;
height: 100%;
background-size: cover;
background-position: center;
}
.scroll-mode .page-container {
position: relative;
min-height: 100vh;
}
/* 页面切换动画 */
.fade-enter-active,
.fade-leave-active {
transition: opacity 1.5s ease;
position: absolute;
width: 100%;
height: 100%;
}
.fade-enter-from {
opacity: 0;
}
.fade-leave-to {
opacity: 0;
}
.fadeInDown-enter-active,
.fadeInDown-leave-active {
transition: all 1.5s ease;
position: absolute;
width: 100%;
height: 100%;
}
.fadeInDown-enter-from {
opacity: 0;
transform: translateY(-100%);
}
.fadeInDown-leave-to {
opacity: 0;
transform: translateY(100%);
}
/* 垂直滑动动画 */
.slide-up-enter-active,
.slide-up-leave-active,
.slide-down-enter-active,
.slide-down-leave-active {
transition: transform 1.5s ease;
position: absolute;
width: 100%;
height: 100%;
}
.slide-up-enter-from {
transform: translateY(100%);
}
.slide-up-leave-to {
transform: translateY(-100%);
}
.slide-down-enter-from {
transform: translateY(-100%);
}
.slide-down-leave-to {
transform: translateY(100%);
}
/* 页面背景动画 */
.animate-fadeInDown {
animation: fadeInDown 1.5s ease 0s 1 normal backwards running;
}
.animate-fadeInUp {
animation: fadeInUp 1.5s ease 0s 1 normal backwards running;
}
.animate-fadeInLeft {
animation: fadeInLeft 1.5s ease 0s 1 normal backwards running;
}
.animate-fadeInRight {
animation: fadeInRight 1.5s ease 0s 1 normal backwards running;
}
.animate-zoomIn {
animation: zoomIn 1.5s ease 0s 1 normal backwards running;
}
.animate-zoomOut {
animation: zoomOut 1.5s ease 0s 1 normal backwards running;
}
@keyframes fadeInDown {
from {
opacity: 0;
transform: translateY(-100%);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(100%);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes fadeInLeft {
from {
opacity: 0;
transform: translateX(-100%);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes fadeInRight {
from {
opacity: 0;
transform: translateX(100%);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes zoomIn {
from {
opacity: 0;
transform: scale(0.5);
}
to {
opacity: 1;
transform: scale(1);
}
}
@keyframes zoomOut {
from {
opacity: 0;
transform: scale(1.5);
}
to {
opacity: 1;
transform: scale(1);
}
}
/* 确保循环时的过渡效果平滑 */
.pages-wrapper {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
}
.page-container {
position: absolute;
width: 100%;
height: 100%;
background-size: cover;
background-position: center;
will-change: transform;
}
.like-button {
display: flex;
flex-direction: column;
align-items: center;
cursor: pointer;
}
.icon-heart {
font-size: 24px;
color: #e74c3c;
}
.liked {
color: #f00; /* 更改颜色以示已赞 */
}
.like-count {
margin-top: 4px;
font-size: 16px;
color: #333;
}
.ant-input-number {
box-sizing: border-box;
margin: 0;
padding: 0;
color: rgba(0, 0, 0, 0.88);
font-size: 14px;
line-height: 1.5714285714285714;
list-style: none;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
position: relative;
display: inline-block;
width: 100%;
min-width: 0;
background-color: #ffffff;
background-image: none;
border-width: 1px;
border-style: solid;
border-color: #d9d9d9;
border-radius: 6px;
transition: all 0.2s;
border: 1px solid #d9d9d9;
}
.ant-form-item {
box-sizing: border-box;
margin: 0;
padding: 0;
color: rgba(0, 0, 0, 0.88);
font-size: 14px;
line-height: 1.5714285714285714;
list-style: none;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
margin-bottom: 0px;
vertical-align: top;
}
.uni-lotties-component {
width: 100%;
height: 100%;
}
.effect {
width: 100%;
height: 100%;
}
.uni-build-up-component {
}
.uni-svg-component {
display: inline-block;
}
.unika-calendar-box {
position: relative;
width: 325px ;
min-height: 300px ;
height: auto ;
padding-bottom: 20px;
}
.unika-calendar-title {
font-size: 25px;
padding-bottom: 4px;
}
.unika-calendar-header {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
-webkit-box-align: end;
-ms-flex-align: end;
align-items: flex-end;
line-height: 1;
padding: 0 47px 20px;
}
.unika-calendar-header .disabled {
pointer-events: none;
color: #f0f0f0;
}
.unika-calendar-th {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start;
height: 25px;
line-height: 25px;
padding: 0 10px;
border-radius: 13px
}
.unika-calendar-th > * {
width: 14.2%;
text-align: center;
color: #fff;
font-size: 15px;
}
.unika-calendar-th > *:not(:first-child) {
margin-left: 10px;
}
.unika-calendar-body {
padding: 0;
margin: 0;
font-size: 0;
padding: 5px 10px 0;
text-align: left;
}
.unika-calendar-editor {
font-size: 25px;
}
.unika-calendar-editor span {
position: relative;
top: 2px;
font-size: 57px;
}
.unika-calendar-day {
display: inline-block;
width: 24px;
height: 24px;
line-height: 24px;
text-align: center;
font-size: 14px;
position: absolute;
border-radius: 50%;
}
.unika-calendar-row {
display: flex;
}
.unika-calendar-row:not(:last-child) {
margin-bottom: 10px;
}
.unika-calendar-row > * {
flex: 1;
padding: 2px;
height: 28px;
box-sizing: border-box;
position: relative;
}
/*.unika-calendar-row > *.color-grey {
background-color: #EBF1F9;
}*/
.unika-calendar-row > *.color-purple {
background-color: #D5C3FF;
}
.unika-calendar-row > *.color-green {
background-color: #AFF0C8;
}
.unika-calendar-row > *.color-today .unika-calendar-day {
background-color: #fff;
font-weight: bold;
}
.unika-calendar-row > *:not(:first-child) {
margin-left: 10px;
}
.unika-calendar span {
color: #fff;
}
.circle2 {
position: relative;
width: 20px;
height: 20px;
left: 1px;
top: 1px;
margin: 0px 0px;
border: 2px solid var(--after-haert-color);
border-radius: 50%;
animation: heartbeat 1s infinite alternate;
}
.circle {
width: 30px;
height: 30px;
margin: -3px;
background-color: var(--after-haert-color);
border-radius: 50%;
animation: heartbeat 1s infinite alternate; /* 应用跳动的动画 */
}
.heart {
position: relative;
width: 30px;
height: 27px;
animation: heartbeat 1s infinite;
}
.heart::before,
.heart::after {
position: absolute;
content: "";
left: 12px;
top: 2px;
width: 15px;
height: 24px;
background-color: var(--after-haert-color);
border-radius: 15px 15px 0 0;
transform: rotate(-45deg);
transform-origin: 0 100%;
}
.heart::after {
left: -3px;
transform: rotate(45deg);
transform-origin: 100% 100%;
}
@keyframes heartbeat {
from {
transform: scale(1);
}
to {
transform: scale(1.2);
}
}
.unika-calendar-header-2 {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
-webkit-box-align: end;
-ms-flex-align: end;
align-items: flex-end;
line-height: 1;
padding: 0 16px 22px;
font-size: 36px
}
.can-top {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
-webkit-box-align: end;
-ms-flex-align: end;
align-items: flex-end;
line-height: 1;
padding: 0 16px 0px;
font-size: 36px
}
.can-top2 {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
-webkit-box-align: end;
-ms-flex-align: end;
align-items: flex-end;
line-height: 1;
padding: 18px 33px 10px;
font-size: 36px
}
.can-year {
font-size: 20px
}
.can-date {
position: relative;
}
.can-date .can-year {
position: absolute;
white-space: nowrap;
left: 50%;
top: 15%;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
font-size: 76px;
opacity: .1;
font-weight: 600;
}
.can-week {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start;
height: 25px;
line-height: 25px;
padding: 0 10px;
border-radius: 13px
}
.can-week div {
width: 14.2%;
text-align: center;
color: #fff;
font-size: 12px;
font-weight: 600;
}
.can-week2 div {
width: 14.2%;
text-align: center;
color: #fff;
font-size: 12px;
font-weight: 600;
}
.can-week2 {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start;
height: 40px;
line-height: 40px;
padding: 0 0px;
border-bottom: 1px solid
}
.no-animation__card {
font-weight: 500;
font-size: var(--countdown-size, 2rem);
line-height: 1.5;
display: block;
color: var(--main-color, #EC685C);
}
.flip-clock {
text-align: center;
perspective: 600px;
margin: 0 auto;
}
.flip-clock *,
.flip-clock *:before,
.flip-clock *:after {
box-sizing: border-box;
}
.flip-clock__piece {
display: inline-block;
margin: 0 0.2vw;
}
@media (min-width: 1000px) {
.flip-clock__piece {
margin: 0 5px;
}
}
.flip-clock__slot {
font-size: var(--label-size, 1rem);
line-height: 1.5;
display: block;
color: var(--label-color, #222222);
}
.flip-card {
display: block;
position: relative;
padding-bottom: 0.72em; /* halfHeight */
font-size: var(--countdown-size, 2.25rem);
line-height: 0.95;
}
@media (min-width: 1000px) {
.flip-clock__slot {
font-size: 1.2rem;
}
.flip-card {
font-size: 3rem;
}
}
.flip-card__top,
.flip-card__bottom,
.flip-card__back-bottom,
.flip-card__back::before,
.flip-card__back::after{
display: block;
height: 0.72em; /* halfHeight */
color: var(--main-color, #EC685C);
background: var(--main-flip-background-color, #222222);
padding: 0.23em 0.15em 0.4em;
border-radius: 0.15em 0.15em 0 0; /* borderRadius */
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
transform-style: preserve-3d;
width: 2.1em;
}
.flip-card__top-4digits,
.flip-card__bottom-4digits,
.flip-card__back-bottom-4digits,
.flip-card__back-4digits::before,
.flip-card__back-4digits::after {
display: block;
height: 0.72em; /* halfHeight */
color: var(--main-color, #EC685C);
background: var(--main-flip-background-color, #222222);
padding: 0.23em 0.15em 0.4em;
border-radius: 0.15em 0.15em 0 0; /* borderRadius */
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
transform-style: preserve-3d;
width: 2.65em;
}
.flip-card__bottom,
.flip-card__back-bottom,
.flip-card__bottom-4digits,
.flip-card__back-bottom-4digits {
color: var(--second-flip-color, #EC685C);
position: absolute;
top: 50%;
left: 0;
border-top: solid 1px var(--second-flip-background-color, #000);
background: var(--second-flip-background-color, #393939);
border-radius: 0 0 0.15em 0.15em; /* borderRadius */
pointer-events: none;
overflow: hidden;
z-index: 2;
}
.flip-card__back-bottom,
.flip-card__back-bottom-4digits {
z-index: 1;
}
.flip-card__bottom::after,
.flip-card__back-bottom::after,
.flip-card__bottom-4digits::after,
.flip-card__back-bottom-4digits::after {
display: block;
margin-top: -0.72em; /* Negative halfHeight */
}
.flip-card__back::before,
.flip-card__bottom::after,
.flip-card__back-bottom::after,
.flip-card__back-4digits::before,
.flip-card__bottom-4digits::after,
.flip-card__back-bottom-4digits::after {
content: attr(data-value);
}
.flip-card__back,
.flip-card__back-4digits {
position: absolute;
top: 0;
height: 100%;
left: 0%;
pointer-events: none;
}
.flip-card__back::before,
.flip-card__back-4digits::before {
position: relative;
overflow: hidden;
z-index: -1;
}
.flip .flip-card__back::before,
.flip .flip-card__back-4digits::before {
z-index: 1;
animation: flipTop 0.3s cubic-bezier(0.37, 0.01, 0.94, 0.35);
animation-fill-mode: both;
transform-origin: center bottom;
}
.flip .flip-card__bottom,
.flip .flip-card__bottom-4digits {
transform-origin: center top;
animation-fill-mode: both;
animation: flipBottom 0.6s cubic-bezier(0.15, 0.45, 0.28, 1);
}
@keyframes flipTop {
0% {
transform: rotateX(0deg);
z-index: 2;
}
0%, 99% {
opacity: 1;
}
100% {
transform: rotateX(-90deg);
opacity: 0;
}
}
@keyframes flipBottom {
0%, 50% {
z-index: -1;
transform: rotateX(90deg);
opacity: 0;
}
51% {
opacity: 1;
}
100% {
opacity: 1;
transform: rotateX(0deg);
z-index: 5;
}
}