css教程 内容:10

CSS实现网站背景渐变多色动画效果

  • 查看作者
  • 纯css实现网页背景动态渐变多色动画特效,给人一种高端大气上档次的感觉。反正谁用谁牛逼好吧。

    CSS实现网站背景渐变多色动画效果 第1张图片

    html

    <div class="text">
        内容
    </div>

    css

    body {
    margin:0;
    padding:0;
    font-family:"montserrat";
    background-image:linear-gradient(125deg,#2c3e50,#27ae60,#2980b9,#e74c3c,#8e44ad);
    background-size:400%;
    animation:bganimation 15s infinite;
    }
    .text {
    color:white;
    text-align:center;
    text-transform:uppercase;
    margin:350px 0;
    font-size:22px;
    }
    @keyframes bganimation {
    0% {
    background-position:0% 50%;
    }
    50% {
    background-position:100% 50%;
    }
    100% {
    background-position:0% 50%;
    }
    }


    请登录之后再进行评论

    登录
    最新评论
    0U币
    已有1008人浏览, 浏览收益0, 礼物收益0, 打赏收益0, 点赞收益0, 广告收益0, 获得总收益0U币
    也可开通会员全场文章免费看
    免费教程