mirror of
				https://gitee.com/vant-contrib/vant.git
				synced 2025-10-31 11:32:09 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			84 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			84 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| @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); }
 | |
| }
 |