从右往左的动画~
HTML代码:
<div class="wrapper-logo">
<div class="marquee">
<div class="marquee__group">
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
</div>
<div class="marquee__group">
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
</div>
</div>
<div class="marquee">
<div class="marquee__group">
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
</div>
<div class="marquee__group">
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
</div>
</div>
<div class="marquee">
<div class="marquee__group">
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
</div>
<div class="marquee__group">
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
</div>
</div>
<div class="marquee">
<div class="marquee__group">
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
</div>
<div class="marquee__group">
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
<div class="item-logo">
<img src="//img.ahap.cn/files/2024/09/2024091100464660.jpg">
</div>
</div>
</div>
</div>
CSS代码:
.wrapper-logo{
--logo-width: 200px;
--logo-height: 100px;
--gap: calc(var(--logo-width) / 14);
--duration: 60s;
--scroll-start: 0;
--scroll-end: calc(-100% - var(--gap));
display: flex;
flex-direction: column;
gap: calc(200px / 14);
margin: auto;
max-width: 100vw
}
.marquee {
display: flex;
overflow: hidden;
-webkit-user-select: none;
user-select: none;
gap: var(--gap);
-webkit-mask-image: linear-gradient(to right,#0000,#000 20%,#000 80%,#0000);
mask-image: linear-gradient(to right,#0000,#000 20%,#000 80%,#0000)
}
.marquee__group {
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: space-around;
gap: var(--gap);
min-width: 100%;
animation: scrollLeft-ffa1cefb var(--duration) linear infinite
}
.item-logo {
width: var(--logo-width);
height: var(--logo-height);
background-color: #f2f2f2;
border-radius: 6px;
display: flex;
justify-content: center;
align-items: center
}
@keyframes scrollLeft-ffa1cefb {
0% {
transform: translate(var(--scroll-start))
}
to {
transform: translate(var(--scroll-end))
}
}
.wrapper-logo .item-logo img{
width: 60px;
height: 60px;
}
.wrapper-logo .marquee:nth-child(2n) {
margin-left: calc(var(--logo-width) / -2)
}
一、本站上的部份代码及教程来源于互联网,仅供网友学习交流。如有侵权,无意侵害您的权益,请发送邮件至zhangshen#ahap.cn或点击右侧 联系我们,我们将尽快处理。
二、请勿将购买的资源教程转载或分享与他人!
二、请勿将购买的资源教程转载或分享与他人!