drip-ui
Version:
Lightweight Mobile UI Components built on Vue
73 lines (60 loc) • 1.22 kB
CSS
@import './common/var.css';
.drip-notice-bar {
display: flex;
color: #ed6a0c;
height: 40px;
padding: 0 15px;
font-size: 14px;
line-height: 24px;
position: relative;
align-items: center;
background-color: #fffbe8;
&--withicon {
position: relative;
padding-right: 40px;
}
&__left-icon {
height: 18px;
min-width: 20px;
box-sizing: border-box;
img {
width: 16px;
height: 16px;
}
}
&__right-icon {
top: 12px;
right: 15px;
font-size: 16px;
position: absolute;
}
&__wrap {
flex: 1;
height: 24px;
overflow: hidden;
position: relative;
}
&__content {
position: absolute;
white-space: nowrap;
&.drip-ellipsis {
max-width: 100%;
}
}
&__play {
animation: drip-notice-bar-play linear both;
}
&__play--infinite {
animation: drip-notice-bar-play-infinite linear infinite both;
}
}
/**
* Declare two same keyframes
* In case that some mobile browsers can continue animation when className changed
*/
@keyframes drip-notice-bar-play {
to { transform: translate3d(-100%, 0, 0); }
}
@keyframes drip-notice-bar-play-infinite {
to { transform: translate3d(-100%, 0, 0); }
}