| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- @import '../style/var';
- .van-notice-bar {
- display: flex;
- height: 40px;
- padding: 0 15px;
- font-size: 14px;
- line-height: 24px;
- position: relative;
- align-items: center;
- color: @orange-dark;
- background-color: @orange-light;
- &__left-icon {
- font-size: 16px;
- min-width: 22px;
- }
- &__right-icon {
- top: 50%;
- right: 15px;
- font-size: 16px;
- position: absolute;
- margin-top: -0.5em;
- }
- &__wrap {
- flex: 1;
- height: 24px;
- overflow: hidden;
- position: relative;
- }
- &__content {
- position: absolute;
- white-space: nowrap;
- &.van-ellipsis {
- max-width: 100%;
- }
- }
- &__play {
- animation: van-notice-bar-play linear both;
- &--infinite {
- animation: van-notice-bar-play-infinite linear infinite both;
- }
- }
- &--wrapable {
- height: auto;
- padding: 8px 15px;
- .van-notice-bar {
- &__wrap {
- height: auto;
- }
- &__content {
- position: relative;
- white-space: normal;
- }
- }
- }
- &--withicon {
- position: relative;
- padding-right: 40px;
- }
- }
- /**
- * Declare two same keyframes
- * In case that some mobile browsers can continue animation when className changed
- */
- @keyframes van-notice-bar-play {
- to { transform: translate3d(-100%, 0, 0); }
- }
- @keyframes van-notice-bar-play-infinite {
- to { transform: translate3d(-100%, 0, 0); }
- }
|