前往小程序,Get更优阅读体验!
立即前往
发布
社区首页 >专栏 >css循环淡入淡出播放

css循环淡入淡出播放

作者头像
阿超
发布2025-01-26 23:38:01
发布2025-01-26 23:38:01
4000
代码可运行
举报
文章被收录于专栏:快乐阿超
运行总次数:0
代码可运行

代码如下:

代码语言:javascript
代码运行次数:0
复制
 import React from "react";
 import clsx from "clsx";
 import styles from './index.module.css';
 import Layout from "@theme/Layout";

 function HomepageHeader() {
  return (
    <header className={clsx('hero', styles.heroBanner)}>
      <div className={clsx(styles.heroContainer)}>
        <img className={clsx(styles.heroBannerImg)} src="/brand-kit/homepage-programmer.webp"
             alt="Programmer"/>
        <div className={clsx(styles.heroTitleBanner)}>
         <h1 className="hero__title">
            <div>Manage Data in Petabytes</div>
            <div className={clsx(styles.heroTitleRounds)}>
              with{' '}
              <span className={clsx(styles.heroTitleRound)}>Massive Write</span>
              <span className={clsx(styles.heroTitleRound)}>Any Scale Read</span>
              <span className={clsx(styles.heroTitleRound)}>Flexible Schema</span>
            </div>
          </h1>
          <div className={clsx(styles.heroBtns)}>
           <a href="/contact" className={clsx(styles.heroBtn)}>Contact Us</a>
            <a href="/blog" className={clsx(styles.heroBtn)}>Blog</a>
          </div>
        </div>
      </div>
    </header>
  );
}

export default function Home(): React.JSX.Element {
  return (
    <Layout
      description="ScopeDB is a database built directly on top of S3 and unleashes the power of cloud elasticity and workload isolation.">
      <HomepageHeader/>
      <main/>
    </Layout>
  );
}

css如下

代码语言:javascript
代码运行次数:0
复制
/**
 * CSS files with the .module.css suffix will be treated as CSS modules
 * and scoped locally.
 */

.heroBanner {
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

@media screen and (max-width: 996px) {
    .heroBanner {
        padding: 2rem;
    }
}

.buttons {
    display: flex;
    align-items: center;
    justify-content: center;
}

.heroContainer {
    display: flex;
}

.heroBannerImg {
    height: 700px;
}

.heroTitleBanner {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.heroTitleRounds {
    display: flex;
    width: 200px;
    overflow: visible;
}

.heroTitleRound {
    opacity: 0;
    animation: fadeInOut 9s infinite;
    white-space: nowrap;
    color: #3071a9;
}

.heroTitleRound:nth-child(1) {
    animation-delay: 0s;
}

.heroTitleRound:nth-child(2) {
    animation-delay: 3s;
}

.heroTitleRound:nth-child(3) {
    animation-delay: 6s;
}

@keyframes fadeInOut {
    0%, 33.33% {
        opacity: 1;
    }
    33.33%, 100% {
        opacity: 0;
        display: none;
    }
}

.heroBtns {
    display: flex;
    justify-content: center;
    gap: 10%;
    margin-top: 20px;;
    scale: 1.1;
}

.heroBtn {
    padding: 10px 16px;
    border-radius: 12px;
    margin: 5px;
    background: rgb(25 91 255);
    color: #fff;
    font-family: Poppins, sans-serif;
    transition: all .25s;
    cursor: pointer;
}

.heroBtn:hover {
    color: #fff;
    text-decoration: none;
    box-shadow: 0 10px 20px -10px rgb(25 91 255);
    transform: translateY(-3px);
}
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2025-01-24,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档