• 动态背景颜色渐变HTML


    在这里插入图片描述
    在这里插入图片描述

    DOCTYPE html>
    <html lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>SSOSNtitle>
        <link rel="shortcut icon" href="../img/cat.ico">
        <meta name="referrer" content="no-referrer">
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=Edge">
        <meta name="viewport"
              content="width=device-width,initial-scale=1.0,user-scalable=no,minimum-scale=1,maximum-scale=1">
        <meta HTTP-EQUIV="pragma" content="no-cache">
        <meta HTTP-EQUIV="Cache-Control" content="no-cache, must-revalidate">
        <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
        <meta HTTP-EQUIV="expires" content="0">
        <meta name="viewport"
              content="width=device-width,initial-scale=1,minimum-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover"/>
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="full-screen" content="yes">
        <meta name="x5-fullscreen" content="true">
        <meta name="apple-mobile-web-app-capable" content="yes"/>
    head>
    <style>
        *{
            background: #000;
            margin: 0;
            padding: 0;
            overflow:hidden;
            -moz-user-select: none;
            -khtml-user-select: none;
            user-select: none;
            -ms-overflow-style: none;
        }
        /*动态渐变背景*/
        .gradient {
            /* 设置容器尺寸 - 原理1 */
            width: 100vw;
            height: 100vh;
            /* 背景渐变色 - 原理2 */
            background: linear-gradient(-45deg, #c45839, #c2396c, #359dc4, #34bd9c);
            /* 背景尺寸 - 原理3 */
            background-size: 600% 600%;
            /* 循环动画 - 原理4 */
            animation: gradientBG 10s ease infinite;
        }
        /* 动画,控制背景 background-position */
        @keyframes gradientBG {
            0% {
                background-position: 0% 50%;
            }
            50% {
                background-position: 100% 50%;
            }
            100% {
                background-position: 0% 50%;
            }
        }
    style>
    <body>
    
    <div class="gradient">div>
    body>
    html>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
  • 相关阅读:
    leetcode解题思路分析(一百二十六)1038 - 1044 题
    JavaWeb---HTML
    python解析曲线数据图方法一则
    蓝桥杯 第 3 场算法双周赛4,7题
    【622. 设计循环队列】
    数据结构之“刷链表题”
    射频微波芯片设计1:岗位以及开发工具详解
    数据成为重要资产,企业应该如何保护数据安全
    爆肝整理,最全单元测试-测试用例总结(全覆盖)及拿即用...
    Linux 压缩解压(归档管理):tar命令
  • 原文地址:https://blog.csdn.net/pengxiaozhong/article/details/133018642