各种集合

https://www.qdfuns.com/article/40816/35da9b3519e18e90a0004d03bb7a29a5.html
开关

<!DOCTYPE html>
<html class=''>

    <head>
        <style class="cp-pen-styles">
            * {
                margin: 0px;
                padding: 0px;
            }

            body {
                background-color: #415062;
            }

            input[type="checkbox"] {
                position: absolute;
                top: 50%;
                left: 50%;
                margin: 0;
                margin-top: -40px;
                margin-left: -80px;
                -webkit-appearance: none;
                -moz-appearance: none;
                appearance: none;
                cursor: pointer;
                -webkit-backface-visibility: hidden;
                backface-visibility: hidden;
                -webkit-transition: all 0.5s cubic-bezier(0.85, 0.1, 0.05, 0.75);
                transition: all 0.5s cubic-bezier(0.85, 0.1, 0.05, 0.75);
                width: 80px;
                height: 80px;
                outline: 40px solid #fff;
                outline-offset: -40px;
                box-shadow: 0 0 0 4px #dfdfdf, 80px 0 0 4px #dfdfdf, 0 0 0 4px #dfdfdf, 80px 0 0 4px #dfdfdf;
            }

            input[type="checkbox"]:checked {
                -webkit-transform: translateX(100%);
                transform: translateX(100%);
                outline-color: #5d6aba;
                box-shadow: 0 0 0 4px #dfdfdf, -80px 0 0 4px #dfdfdf, -80px 0 0 4px #dfdfdf, 0 0 0 4px #dfdfdf;
            }

            input[type="checkbox"]:checked+.backgroundAnimation {
                background-color: #baad5d;
            }

            .backgroundAnimation {
                width: 100vw;
                height: 100vh;
                -webkit-transition: background-color 0.5s ease;
                transition: background-color 0.5s ease;
            }
        </style>
    </head>

    <body>

        <input type="checkbox" />
        <!-- option-->
        <div class="backgroundAnimation"></div>

    </body>

</html>

菜单悬停效果

<!DOCTYPE html>
<html>

    <head>
        <meta charset="UTF-8">
        <title>CSS菜单悬停效果</title>
        <style>
            html {
                box-sizing: border-box;
            }

            *,
            *:before,
            *:after {
                box-sizing: inherit;
                padding: 0;
                margin: 0;
            }

            body,
            html {
                width: 100%;
                height: 100%;
                background: #222;
                font-family: 'Varela Round', sans-serif;
            }

            nav {
                display: -webkit-box;
                display: -ms-flexbox;
                display: flex;
                -webkit-box-orient: vertical;
                -webkit-box-direction: normal;
                -ms-flex-direction: column;
                flex-direction: column;
                -webkit-box-pack: center;
                -ms-flex-pack: center;
                justify-content: center;
                -webkit-box-align: center;
                -ms-flex-align: center;
                align-items: center;
                max-width: 600px;
                height: 100%;
                margin: 0 auto;
            }

            nav a {
                text-decoration: none;
                font-size: 25px;
                color: #ddd;
                position: relative;
                margin-bottom: 50px;
                -webkit-transition: all .2s;
                transition: all .2s;
                overflow: hidden;
            }

            nav a:hover {
                color: #fff;
            }

            nav a:last-child {
                margin-bottom: 0px;
            }

            nav a::before {
                content: "";
                position: absolute;
                top: 0px;
                left: -100%;
                width: 100%;
                height: 100%;
                background: #eb2141;
                z-index: 99;
                -webkit-transition: all 0.4s cubic-bezier(0.7, 0, 0.3, 1);
                transition: all 0.4s cubic-bezier(0.7, 0, 0.3, 1);
            }

            nav a:hover::before {
                left: 100%;
            }

            nav a::after {
                content: "";
                position: absolute;
                top: 50%;
                margin-top: -2px;
                left: 100%;
                width: 100%;
                height: 4px;
                background: #eb2141;
                -webkit-transition: all .3s;
                transition: all .3s;
                -webkit-transition-delay: .4s;
                transition-delay: .4s;
            }

            nav a:hover::after {
                left: 0%;
            }
        </style>

    </head>

    <body translate="no">
        <!--是否要翻译-->

        <nav>
            <a href="#!">
                <span>HOME</span>
            </a>
            <a href="#!">
                <span>ABOUT</span>
            </a>
            <a href="#!">
                <span>CONTACT</span>
            </a>
            <a href="#!">
                <span>FAQ</span>
            </a>
        </nav>

    </body>

</html>

load

<!DOCTYPE html>
<html>

    <head>
        <meta charset="UTF-8">
        <meta name="google" value="notranslate">
        <title>CSS3loading加载进度页面</title>

        <style>
            .page {
                padding: 40px;
            }

            html,
            body {
                height: 100%;
                margin: 0;
                padding: 0;
                font-family: Helvetica, Arial, sans-serif;
            }

            body {
                background: #fff
            }

            #splash {
                background: #cc1f2f;
                background-repeat: repeat-y;
                position: fixed;
                left: 0;
                top: 0;
                width: 100%;
                height: 100%;
                animation: splash 3s ease-in;
                animation-fill-mode: forwards;
                -webkit-animation-fill-mode: forwards;
            }

            #loader {
                position: absolute;
                left: 50%;
                top: 0;
                transform: translate(-50%, 0);
            }

            #loader:after {
                content: '';
                position: absolute;
                left: 50%;
                margin-left: -8px;
                bottom: -170px;
                width: 3px;
                background: #fff;
                background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0) 100%);
                height: 200px;
            }

            #loader:before {
                content: '';
                position: absolute;
                left: 50%;
                margin-left: 8px;
                bottom: -190px;
                width: 3px;
                background: #000;
                background: linear-gradient(to bottom, rgba(0, 0, 0, .2) 0%, rgba(0, 0, 0, .2) 50%, rgba(0, 0, 0, 0) 100%);
                height: 200px;
            }

            #splash .anim {
                height: 100%;
                position: absolute;
                left: 50%;
                width: 100px;
                transform: translate(-50%, 100%);
                animation: loader 4s linear;
                animation-fill-mode: forwards;
                -webkit-animation-fill-mode: forwards;
            }

            @keyframes loader {
                0% {
                    transform: translate(-50%, 110%);
                }
                30% {
                    transform: translate(-50%, 50%);
                }
                100% {
                    transform: translate(-50%, 0%);
                }
            }

            @keyframes splash {
                0% {
                    transform: translate(0%, 0%);
                }
                50% {
                    transform: translate(0%, 0%);
                }
                100% {
                    transform: translate(0%, -100%);
                }
            }
        </style>

    </head>

    <body>

        <div class="page">
            <header>
                <h1>Welcome</h1>
                <p>Just a test for a loading information. Press reload to repeat.</p>
            </header>
        </div>
        <div id="splash">
            <div class="anim">
                <div id="loader">
                    <svg version="1.1" width="60px" height="70px" viewBox="0 0 60 70">
                        <defs>
                            <filter id="f1" x="0" y="0">
                                <feGaussianBlur in="SourceGraphic" stdDeviation="2" />
                            </filter>
                        </defs>
                        <g id="airplane">
                            <path fill="#000" d="M0.677,20.977l4.355,1.631c0.281,0.104,0.579,0.162,0.88,0.16l9.76-0.004L30.46,41.58c0.27,0.34,0.679,0.545,1.112,0.541
          h1.87c0.992,0,1.676-0.992,1.322-1.918l-6.643-17.439l6.914,0.002l6.038,6.037c0.265,0.266,0.624,0.412,0.999,0.418l1.013-0.004
          c1.004-0.002,1.684-1.012,1.312-1.938l-2.911-7.277l2.912-7.278c0.372-0.928-0.313-1.941-1.313-1.938h1.017
          c-0.375,0-0.732,0.15-0.996,0.414l-6.039,6.039h-6.915l6.646-17.443c0.354-0.926-0.33-1.916-1.321-1.914l-1.87-0.004
          c-0.439,0.004-0.843,0.203-1.112,0.543L15.677,17.24l-9.765-0.002c-0.3,0.002-0.597,0.055-0.879,0.16L0.678,19.03
          C-0.225,19.36-0.228,20.637,0.677,20.977z" transform="translate(44,0) rotate(90 0 0)" />
                        </g>
                        <g id="shadow" transform="scale(.9)">
                            <path fill="#000" fill-opacity="0.3" d="M0.677,20.977l4.355,1.631c0.281,0.104,0.579,0.162,0.88,0.16l9.76-0.004L30.46,41.58c0.27,0.34,0.679,0.545,1.112,0.541
            h1.87c0.992,0,1.676-0.992,1.322-1.918l-6.643-17.439l6.914,0.002l6.038,6.037c0.265,0.266,0.624,0.412,0.999,0.418l1.013-0.004
            c1.004-0.002,1.684-1.012,1.312-1.938l-2.911-7.277l2.912-7.278c0.372-0.928-0.313-1.941-1.313-1.938h1.017
            c-0.375,0-0.732,0.15-0.996,0.414l-6.039,6.039h-6.915l6.646-17.443c0.354-0.926-0.33-1.916-1.321-1.914l-1.87-0.004
            c-0.439,0.004-0.843,0.203-1.112,0.543L15.677,17.24l-9.765-0.002c-0.3,0.002-0.597,0.055-0.879,0.16L0.678,19.03
            C-0.225,19.36-0.228,20.637,0.677,20.977z" transform="translate(64,30) rotate(90 0 0)" filter="url(#f1)" />
                        </g>
                    </svg>
                </div>
            </div>
        </div>

    </body>

</html>

开关

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 194,524评论 5 460
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 81,869评论 2 371
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 141,813评论 0 320
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 52,210评论 1 263
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 61,085评论 4 355
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 46,117评论 1 272
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 36,533评论 3 381
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 35,219评论 0 253
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 39,487评论 1 290
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 34,582评论 2 309
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 36,362评论 1 326
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 32,218评论 3 312
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 37,589评论 3 299
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 28,899评论 0 17
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 30,176评论 1 250
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 41,503评论 2 341
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 40,707评论 2 335

推荐阅读更多精彩内容

  • 1、通过CocoaPods安装项目名称项目信息 AFNetworking网络请求组件 FMDB本地数据库组件 SD...
    X先生_未知数的X阅读 15,960评论 3 119
  • 每到期末考试这几天是大家最开心的几天。今天是期末考试的前一天,孩子们也按耐不住心中的兴奋,脸上的笑容须臾不曾离开。...
    八七在路上阅读 179评论 0 1
  • 你不是我,亦如我不是你一样。我们从一个陌生人变成了吃喝拉撒睡在一起的夫妻,从同甘共苦心有灵犀到现在的沉默无语相对无...
    明湖莲阅读 265评论 0 0
  • 在现实生活中, 与陌生人认识的第一步是比较难的, 这个场景放在线上, 问题同样没被很好解决 !!! “ HI 一周...
    im王宇驰阅读 345评论 4 4
  • 在易效能线下课践行的第73天,还剩下17天就要结束了。这天坐下来和同事聊天,他们眼中的我是什么样?他人犹如一面镜子...
    王昌伦阅读 128评论 2 4