每日分享html特效篇1个侧边栏菜单+2个导航栏+1个登录页面+6个加载

24 篇文章 17 订阅
订阅专栏

我是c站的一个小博主L_ar,近期我会每天分享前端知识包括(原生的web语句,以及vue2和vue3,微信小程序的写法及知识点)本篇文章收录于html特效专栏中,如果想每天在我这学到一些东西,请关注我并订阅专栏,每天都分享前端知识哦~

前端是做什么的?

1.前端工程师主要利用HMTL与CSS建构页面(其中html构建骨架,css构建样式),用JavaScript获取后端数据以及完善交互以及用户体验。
2.通俗来讲,前端在一个项目里,拿到UI设计师设计的设计稿,然后实现UI设计师设计稿,调用后端程序员给的数据接口以获取数据,然后测试,最后部署上线。
3.前端可以对设计图负责,大部分情况下,不需要特别的去理解业务逻辑,因为我们90后都是玩着十几年手机电脑长大的,十几年的经验足够我们在潜意识里想明白应该怎么做,怎么去一步步实现,会有什么意外情况。
4.我感觉前端发展有个很大的缺陷----晋升问题. 正如第三点所言,作为领导必须对项目有足够的了解,显然是要重点包括业务逻辑,这点上,后端开发者需要涉及数据库逻辑,是必须要跟业务逻辑打交道的(重中之重),因此,大部分的领导岗位都是后端开发者更有晋升的机会。当然,个别公司有专门的前端组长(这也不算什么),如果说前端开发者在自己工作范围之外还要腾出时间去研究业务逻辑,属实是觉得出力不讨好(因为这样的操作需要持续很久才能看出效果),而且再怎么研究业务逻辑也不会比每时每刻跟业务逻辑打交道的后端开发者了解更多。说实在的,大部分情况下,前端在配合后端进行开发.后端需要了解业务逻辑,要跟领导和客户商量细节,露脸机会很大,在老板面前刷脸次数众多。这些都是拉开前后端程序员晋升机会差距的因素。

前端的特效视觉:

层次结构的表现

动态效果,如缩放,覆盖,滑出网页或单个视觉元素,可帮助用户理解网页信息架构。通常是通过转场和菜单来展开网页。

表现层级关系

为了展现层与层的关系,是抽屉,是打开,还是平级切换等等。让用户知道这个界面和上一个、下一个的关系。

清晰明确

动效可以清晰地表明各种数据块中间的逻辑结构,即使在数据高度饱和的情况下也能使一切从观感上有组织性。

添加了图层

在网站制作过程中加上特效,每个元素都在用户滚动页面或者是鼠标经过的地方有动态效果,就像在平面层上多出了一个动态层,这样看起来更加有层次感。

我想借此专栏发布的内容帮助那些正在入坑前端的家人们,同时作为我以后复习的笔记,希望我们可以互相帮助,共同加油!!!

1.侧边栏菜单简约版

<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">

    <title>侧边导航栏</title>
    <!-- 引入字体图标 -->
    <link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" rel="stylesheet">

    <style>
        *{
    /* 初始化 */
    margin: 0;
    padding: 0;
}
body{
    /* 100%窗口高度 */
    height: 100vh;
    /* 弹性布局 居中 */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #7284a7;
}
ul{
    list-style: none;
}
nav{
    /* 固定定位 */
    position: fixed;
    width: 300px;
    height: 650px;
    left: 0;
    background-color: #ffbb00;
    border-radius: 20px 20px 20px 0px;
}
.menus{
    /* 垂直居中 */
    margin: 50px 0;
    color: #fff;
}
.li{
    letter-spacing: 2px;
    font-size: 17px;
    font-weight: 600;
    padding: 16px 0;
    /* 动画过渡 */
    transition: 0.3s;
}
.menus li:hover{
    background-color: #ae00ff;
}
.li .fa{
    font-size: 20px;
    width: 50px;
    height: 20px;
    text-align: center;
    margin-left: 5px;
}
.li ul{
    border-radius: 20px;
    width: 0;
    height: 550px;
    padding: 50px 0;
    background-color: #a06993;
    position: absolute;
    top: 0;
    right: 0;
    overflow: hidden;
    transition: 0.3s;
}
.li ul li{
    padding: 16px 24px;
    /* 文字禁止换行 */
    white-space: nowrap;
    transition: 0.3s;
}
.li:hover ul{
    border-radius: 20px;
    width: 250px;
}
.li ul li:hover{
    background-color: #c28fb4;
}
    </style>
</head>

<body>
    <nav>
        <ul class="menus">
            <li class="li">
                <i class="fa fa-qq" aria-hidden="true"></i>
                QQ
                <ul>
                    <li><i class="fa fa-qq" aria-hidden="true">1号</i></li>
                    <li><i class="fa fa-qq" aria-hidden="true">2号</i></li>
                    <li><i class="fa fa-qq" aria-hidden="true">3号</i></li>
                    <li><i class="fa fa-qq" aria-hidden="true">4号</i></li>
                    <li><i class="fa fa-qq" aria-hidden="true">5号</i></li>
                    <li><i class="fa fa-qq" aria-hidden="true">6号</i></li>
                    <li><i class="fa fa-qq" aria-hidden="true">7号</i></li>
                </ul>
            </li>
            <li class="li">
                <i class="fa fa-weixin" aria-hidden="true"></i>
                weixin
                <ul>
                    <li><i class="fa fa-weixin" aria-hidden="true">1号</i></li>
                    <li><i class="fa fa-weixin" aria-hidden="true">2号</i></li>
                    <li><i class="fa fa-weixin" aria-hidden="true">3号</i></li>
                    <li><i class="fa fa-weixin" aria-hidden="true">4号</i></li>
                    <li><i class="fa fa-weixin" aria-hidden="true">5号</i></li>
                    <li><i class="fa fa-weixin" aria-hidden="true">6号</i></li>
                    <li><i class="fa fa-weixin" aria-hidden="true">7号</i></li>
                    <li><i class="fa fa-weixin" aria-hidden="true">8号</i></li>
                    <li><i class="fa fa-weixin" aria-hidden="true">9号</i></li>
                    <li><i class="fa fa-weixin" aria-hidden="true">10号</i></li>
                </ul>
            </li>
            <li class="li">
                <i class="fa fa-weibo" aria-hidden="true"></i>
                weibo
                <ul>
                    <li><i class="fa fa-weibo" aria-hidden="true">1号</i></li>
                    <li><i class="fa fa-weibo" aria-hidden="true">2号</i></li>
                    <li><i class="fa fa-weibo" aria-hidden="true">3号</i></li>

                </ul>
            </li>
            <li class="li">
                <i class="fa fa-tencent-weibo" aria-hidden="true"></i>
                tencent-weibo
                <ul>
                    <li><i class="fa fa-tencent-weibo" aria-hidden="true">1号</i></li>
                    <li><i class="fa fa-tencent-weibo" aria-hidden="true">2号</i></li>
                    <li><i class="fa fa-tencent-weibo" aria-hidden="true">3号</i></li>
                    <li><i class="fa fa-tencent-weibo" aria-hidden="true">4号</i></li>
                    <li><i class="fa fa-tencent-weibo" aria-hidden="true">5号</i></li>
                </ul>
            </li>
            <li class="li">
                <i class="fa fa-telegram" aria-hidden="true"></i>
                telegram
                <ul>
                    <li><i class="fa fa-telegram" aria-hidden="true">1号</i></li>
                    <li><i class="fa fa-telegram" aria-hidden="true">2号</i></li>
                    <li><i class="fa fa-telegram" aria-hidden="true">3号</i></li>
                    <li><i class="fa fa-telegram" aria-hidden="true">4号</i></li>
                    <li><i class="fa fa-telegram" aria-hidden="true">5号</i></li>
                </ul>
            </li>
        </ul>
    </nav>
</body>

</html>

 2.导航栏点击波痕

 

<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">

    <title>点击波痕特效按钮</title>
    <style>
        *{
    /* 初始化 */
    margin: 0;
    padding: 0;
}
body{
    /* 100%窗口高度 */
    height: 100vh;
    /* 弹性布局 居中 */
    display: flex;
    justify-content: center;
    align-items: center;
    /* 渐变背景 */
    background: linear-gradient(200deg,#faa200,#ff03b3);;
}
.btn-box{
    width: 500px;
    /* 弹性布局 */
    display: flex;
    /* 横向排列 */
    flex-direction: row;
    /* 允许换行 */
    flex-wrap: wrap;
    /* 平均分配宽度给每一个子元素 */
    justify-content: space-around;
}
.btn-box button{
    /* 相对定位 */
    position: relative;
    border: none;
    background: linear-gradient(to right,#4806ff,#efff0b);;
    width: 200px;
    height: 60px;
    margin: 20px 0;
    font-size: 18px;
    color: #fff;
    /* 字间距 */
    letter-spacing: 3px;
    border-radius: 30px;
    /* 阴影 */
    box-shadow: 3px 5px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    /* 这里加个溢出隐藏 */
    overflow: hidden;
}
.btn-box button:hover{
    box-shadow: 3px 5px 10px rgba(0,0,0,0.2);
}
.btn-box button span{
    /* 绝对定位 */
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: rgb(255, 0, 0);
    border-radius: 50%;
    transform: translate(-50%,-50%);
    /* 设置元素不对指针事件做出反应 */
    pointer-events: none;
    /* 执行动画 */
    animation: animate 1s ease;
}

/* 定义动画 */
@keyframes animate {
    from{
        width: 0;
        height: 0;
        opacity: 0.5;
    }
    to{
        width: 400px;
        height: 400px;
        opacity: 0;
    }
}
    </style>
</head>

<body>
    <h1 style="font-size: 50px;color: rgb(255, 247, 247);">L_ar</h1>
    <div class="btn-box">
        <button>点赞</button>
        <button>关注</button>
        <button>收藏</button>
        <button>评论</button>
    </div>
    <script type="text/javascript">
        // 获取所有按钮对象
        const btns=document.querySelectorAll("button");
        // 循环所有按钮,并为每一个按钮添加点击事件
        btns.forEach(btn=>{
            btn.addEventListener("click",e=>{
                // 创建span元素,并设置其位置为鼠标点击的位置
                let span=document.createElement("span");
                span.style.left=e.offsetX+"px";
                span.style.top=e.offsetY+"px";
                // 将span元素添加到按钮标签里
                btn.appendChild(span);
                // 1秒后删除span元素
                setTimeout(() => {
                    span.remove();
                }, 1000);
            })
        })
    </script>
</body>

</html>

3.鼠标悬停波痕

 图片资源:

 

<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">

    <title>水波纹按钮效果</title>
    <style>
        *{
    /* 初始化 */
    margin: 0;
    padding: 0;
}
body{
    /* 100%窗口高度 */
    height: 100vh;
    /* 弹性布局 居中 */
    display: flex;
    justify-content: center;
    align-items: center;
    /* 渐变背景 */
    background: linear-gradient(200deg,#ff00b3,#7700ff);
}
.ziti{
    font-size: 50px;
    color: rgb(229, 255, 0);
}
.btn-box{
    width: 500px;
    /* 弹性布局 */
    display: flex;
    /* 横向排列 */
    flex-direction: row;
    /* 允许换行 */
    flex-wrap: wrap;
    /* 平均分配宽度 */
    justify-content: space-around;
}
.btn-box .btn{
    /* 相对定位 */
    position: relative;
    width: 200px;
    height: 60px;
    line-height: 60px;
    text-align: center;
    color: #00ff6a;
    border: 2px solid #ff0000;
    font-size: 18px;
    margin: 20px 0;
    /* 字间距 */
    letter-spacing: 4px;
    cursor: pointer;
    /* 溢出隐藏 */
    overflow: hidden;
}
.btn-box .btn span{
    position: relative;
    z-index: 1;
    /* 动画过渡 */
    transition: 1s;
}
.btn-box .btn .wave{
    /* 绝对定位 */
    position: absolute;
    top: calc(100% + 22px);
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ff0000;
    transition: 1s;
}
.btn-box .btn .wave::before{
    content: "";
    position: absolute;
    top: -22px;
    left: 0;
    background-image: url("hongbolang.png");
    width: 100%;
    height: 22px;
    /* 执行动画:动画名 时长 线性的 无限次播放 */
    animation: animate 0.5s linear infinite;
}
.btn-box .btn:hover .wave{
    top: 0;
}
.btn-box .btn:hover span{
    color: #fff;
}

/* 定义动画 */
@keyframes animate {
    0%{
        background-position-x: 0;
        background-position-y: -22px;
    }
    100%{
        background-position-x: 118px;
        background-position-y: -22px;
    }
}
    </style>
</head>

<body>
    <span class="ziti">L_ar</span>
    <div class="btn-box">
        <div class="btn">
            <span>点赞</span>
            <div class="wave"></div>
        </div>
        <div class="btn">
            <span>关注</span>
            <div class="wave"></div>
        </div>
        <div class="btn">
            <span>收藏</span>
            <div class="wave"></div>
        </div>
        <div class="btn">
            <span>评论</span>
            <div class="wave"></div>
        </div>
    </div>
</body>

</html>

4.简约版登陆界面

 

<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">

    <title>背景动态变化的登录界面</title>
    <style>
        *{
    /* 初始化 */
    margin: 0;
    padding: 0;
}
body{
    /* 100%窗口高度 */
    height: 100vh;
    /* 弹性布局 居中 */
    display: flex;
    justify-content: center;
    align-items: center;
    /* 渐变背景 */
    background: linear-gradient(200deg,#e3c5eb,#a9c1ed);
    /* 溢出隐藏 */
    overflow: hidden;
}
.container{
    /* 相对定位 */
    position: relative;
    z-index: 1;
    background-color: #fff;
    border-radius: 15px;
    /* 弹性布局 垂直排列 */
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 350px;
    height: 500px;
    /* 阴影 */
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
span{
    width: 100%;
}
.flex{
    display: flex;
    flex-direction: row;
    justify-content: space-around
}
.container .tit{
    font-size: 26px;
    margin: 65px auto 70px auto;
}
.container input{
    width: 280px;
    height: 30px;
    text-indent: 8px;
    border: none;
    border-bottom: 1px solid rgb(115, 116, 219);
    outline: none;
    margin: 12px auto;
}
.container button{
    width: 280px;
    height: 40px;
    margin: 35px auto 40px auto;
    border: none;
    background: linear-gradient(-200deg,#ff03ab,#6f00ff);
    color: #fff;
    font-weight: bold;
    letter-spacing: 8px;
    border-radius: 10px;
    cursor: pointer;
    /* 动画过渡 */
    transition: 0.5s;
}
.container button:hover{
    background: linear-gradient(-200deg,#6f00ff,#ff03ab);
    background-position-x: -280px;
}
.container span{
    font-size: 14px;
}
.container a{
    color: rgb(255, 60, 0);
    text-decoration: none;
}
ul li{
    position: absolute;
    border: 1px solid rgb(255, 238, 0);
    background-color: rgb(255, 238, 0);
    width: 30px;
    height: 30px;
    list-style: none;
    opacity: 0;
}
.square li{
    top: 40vh;
    left: 60vw;
    /* 执行动画:动画名 时长 线性的 无限次播放 */
    animation: square 10s linear infinite;
}
.square li:nth-child(2){
    top: 80vh;
    left: 10vw;
    /* 设置动画延迟时间 */
    animation-delay: 2s;
}
.square li:nth-child(3){
    top: 80vh;
    left: 85vw;
    /* 设置动画延迟时间 */
    animation-delay: 4s;
}
.square li:nth-child(4){
    top: 10vh;
    left: 70vw;
    /* 设置动画延迟时间 */
    animation-delay: 6s;
}
.square li:nth-child(5){
    top: 10vh;
    left: 10vw;
    /* 设置动画延迟时间 */
    animation-delay: 8s;
}
.circle li{
    bottom: 0;
    left: 15vw;
    /* 执行动画 */
    animation: circle 10s linear infinite;
}
.circle li:nth-child(2){
    left: 35vw;
    /* 设置动画延迟时间 */
    animation-delay: 2s;
}
.circle li:nth-child(3){
    left: 55vw;
    /* 设置动画延迟时间 */
    animation-delay: 6s;
}
.circle li:nth-child(4){
    left: 75vw;
    /* 设置动画延迟时间 */
    animation-delay: 4s;
}
.circle li:nth-child(5){
    left: 90vw;
    /* 设置动画延迟时间 */
    animation-delay: 8s;
}

/* 定义动画 */
@keyframes square {
    0%{
        transform: scale(0) rotateY(0deg);
        opacity: 1;
    }
    100%{
        transform: scale(5) rotateY(1000deg);
        opacity: 0;
    }
}
@keyframes circle {
    0%{
        transform: scale(0) rotateY(0deg);
        opacity: 1;
        bottom: 0;
        border-radius: 0;
    }
    100%{
        transform: scale(5) rotateY(1000deg);
        opacity: 0;
        bottom: 90vh;
        border-radius: 50%;
    }
}
    </style>
</head>

<body>
    <div class="container">
        <div class="tit">登录</div>
        <input type="text" placeholder="账号">
        <input type="password" placeholder="密码">
        <button>登录</button>
        <span class="flex">
            <a href="#">忘记密码</a>
            <a href="#">去注册</a>
        </span>
    </div>
    <div class="square">
        <ul>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
        </ul>
    </div>
    <div class="circle">
        <ul>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
        </ul>
    </div>
</body>

</html>

5.彩虹条状爱心加载页面效果

 

<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">

    <title>炫彩爱心加载特效</title>
    <style>
        body{
    margin: 0;
    /* 100%窗口高度 */
    height: 100vh;
    /* 弹性布局 水平、垂直居中 */
    display: flex;
    align-items: center;
    justify-content: center;
    /* 背景径向渐变 */
    background: radial-gradient(circle at center,mediumpurple,#000);
}
.heart{
    width: 280px;
    height: 220px;
    display: flex;
    justify-content: space-between;
}
.heart span{
    /* 自定义属性值【划重点】 */
    --c:plum;
    --h:50%;
    --t:25%;
    /* var()函数用于插入自定义的属性值,如果一个属性值在多处被使用,该方法就很有用 */
    background-color: var(--c);
    width: 20px;
    border-radius: 10px;
    position: relative;
    height: var(--h);
    top: var(--t);
    /* 执行动画 infinite是无限次播放 */
    animation: beating 1s infinite;
}
.heart span:nth-child(1),
.heart span:nth-child(9){
    --c:rgb(255, 0, 0);
    --h:60px;
    --t:44px;
}
.heart span:nth-child(2),
.heart span:nth-child(8){
    --c:rgb(255, 0, 191);
    --h:120px;
    --t:12px;
}
.heart span:nth-child(3),
.heart span:nth-child(7){
    --c:rgb(0, 255, 0);
    --h:160px;
    --t:0;
}
.heart span:nth-child(4),
.heart span:nth-child(6){
    --c:rgb(0, 102, 255);
    --h:180px;
    --t:16px;
}
.heart span:nth-child(5){
    --c:rgb(212, 0, 255);
    --h:188px;
    --t:32px;
}
.bix{
    font-size: 60px;
    color: aliceblue;
    position: absolute;
    left: 45%;
    top: 200px;
}

/* 接下来我们定义动画 */
@keyframes beating{
    0%,30%{
        height: var(--h);
        top: var(--t);
        background-color: var(--c);
        filter: blur(0);
    }
    60%,70%{
        height: 50%;
        top: 25%;
        background-color: rgb(55, 208, 255);
        /* 模糊度 */
        filter: blur(5px);
    }
}
    </style>
</head>

<body>
    <span class="bix">加载中</span>
    <div class="heart">
        <span></span>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
    </div>
</body>

</html>

6.彩色试管加载效果

 

<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">

    <title>纯CSS实现漂亮的加载动画</title>
    <style>
        *{
    /* 初始化 取消页面内外边距 */
    margin: 0;
    padding: 0;
    /* 这个是告诉浏览器:你想要设置的边框喝内边距的值是包含在总宽高内的 */
    box-sizing: border-box;
}
body{
    /* 100%窗口高度 */
    height: 100vh;
    /* 弹性布局 水平、垂直居中 */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #7eb1f5;
}
.loading{
    display: flex;
    /* 水平显示 */
    flex-direction: row;
}
.loading div{
    position: relative;
    width: 40px;
    height: 200px;
    /* 渐变背景 */
    background: linear-gradient(to bottom,rgba(0,0,0,0.05),#eef1f5);
    margin: 20px;
    border-radius: 20px;
    border: 2px solid #eef1f5;
    /* 阴影 */
    box-shadow: 15px 15px 20px rgba(0,0,0,0.1),
                -15px -15px 20px #fff,
                inset -5px -5px 5px rgba(255,255,255,0.5),
                inset 5px 5px 5px rgba(0,0,0,0.05);
    /* 溢出隐藏 */
    overflow: hidden;
}
.loading div::before{
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    box-shadow: inset -5px -5px 5px rgba(0,0,0,0.1),
                0 420px 0 400px lightskyblue;
    /* 执行动画:动画名称 时长 加速后减速 无限次播放 */
    animation: animate 2s ease-in-out infinite;
    /* 动画延迟 通过var函数获取自定义属性--x,再由calc函数计算得出每个元素的动画延迟时间 */
    animation-delay: calc(var(--x) * -0.3s);
    /* 初始化时先向上移动160px */
    transform: translateY(160px);
}
.bix{
    font-size: 60px;
    color: aliceblue;
    position: absolute;
    left: 44%;
    top: 200px;
}

/* 定义动画 */
@keyframes animate{
    0%{
        transform: translateY(160px);
        /* hue-rotate是颜色滤镜,可以设置不同的度数来改变颜色 */
        filter: hue-rotate(0deg);
    }
    50%{
        transform: translateY(0px);
        filter: hue-rotate(180deg);
    }
    100%{
        transform: translateY(160px);
        filter: hue-rotate(360deg);
    }
}
    </style>
</head>

<body>
    <span class="bix">正在加载</span>
    <div class="loading">
        <!-- 【--x是自定义属性,在后面样式中会用到】 -->
        <div style="--x:0"></div>
        <div style="--x:1"></div>
        <div style="--x:2"></div>
        <div style="--x:3"></div>
        <div style="--x:4"></div>
        <div style="--x:5"></div>
    </div>
</body>

</html>

7.三色旋转加载效果

 

<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">

    <title>好看的加载动画效果</title>
    <style>
        *{
    /* 初始化 取消页面内外边距 */
    margin: 0;
    padding: 0;
}
body{
    /* 100%窗口高度 */
    height: 100vh;
    /* 渐变背景 */
    background: linear-gradient(to bottom,#762b2b,#263f09);
    /* 弹性布局 水平、垂直居中 */
    display: flex;
    justify-content: center;
    align-items: center;
}
.loading{
    width: 200px;
    height: 200px;
    box-sizing: border-box;
    border-radius: 50%;
    border-top: 10px solid #e502fa;
    /* 相对定位 */
    position: relative;
    /* 执行动画(动画a1 时长 线性的 无限次播放) */
    animation: a1 2s linear infinite;
}
.loading::before,.loading::after{
    content: "";
    width: 200px;
    height: 200px;
    /* 绝对定位 */
    position: absolute;
    left: 0;
    top: -10px;
    box-sizing: border-box;
    border-radius: 50%;
}
.loading::before{
    border-top: 10px solid #ffbf00;
    /* 旋转120度 */
    transform: rotate(120deg);
}
.loading::after{
    border-top: 10px solid #ff2f00;
    /* 旋转240度 */
    transform: rotate(240deg);
}
.loading span{
    position: absolute;
    width: 200px;
    height: 200px;
    line-height: 200px;
    text-align: center;
    color: #fff;
    /* 执行动画(动画a2 时长 线性的 无限次播放) */
    animation: a2 2s linear infinite;
}

/* 定义动画 */
@keyframes a1{
    to{
        transform: rotate(360deg);
    }
}
@keyframes a2{
    to{
        transform: rotate(-360deg);
    }
}
    </style>
</head>

<body>
    <div class="loading">
        <span>拼命加载中</span>
    </div>
</body>

</html>

8.金属质感光闪加载效果

 

<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">

    <title>动感的金属质感闪光文字</title>
    <style>
        *{
    /* 初始化 */
    margin: 0;
    padding: 0;
}
body{
    /* 100%窗口高度 */
    height: 100vh;
    /* 弹性布局 居中 */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
}
.container{
    /* 给图片应用一种线性乘法,使其看起来更亮或更暗 */
    filter: brightness(300%);
    /* 溢出隐藏 */
    overflow: hidden;
}
span.text{
    color: #fff;
    font-size: 200px;
    font-weight: bold;
    background-color: #000;
}
span.text::before{
    content: "LOADING...";
    /* 绝对定位 */
    position: absolute;
    /* 设置混合模式为:差别 */
    mix-blend-mode: difference;
    /* 模糊 */
    filter: blur(2px);
}
span.back{
    /* 渐变背景 */
    background: linear-gradient(113deg,rgb(0, 174, 255),rgb(99, 3, 253));
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    /* 设置混合模式为:乘法(类似PS的正片叠底) */
    mix-blend-mode: multiply;
}
span.shine{
    /* 径向渐变背景,并且尺寸缩放为25%,按照默认方式平铺 */
    background: radial-gradient(circle at center,#fff,#000 35%) center / 25% 25%;
    position: absolute;
    top: -100%;
    left: -100%;
    bottom: 0;
    right: 0;
    /* 设置混合模式为:颜色减淡 */
    mix-blend-mode: color-dodge;
    animation: move 2s linear infinite;
}

/* 定义动画 */
@keyframes move {
    to{
        transform: translate(50%,50%);
    }
}
    </style>
</head>

<body>
    <div class="container">
        <span class="text">LOADING...</span>
        <span class="back"></span>
        <span class="shine"></span>
    </div>
</body>

</html>

9.高级旋转变色加载特效

 

<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">

    <title>高级的转动变色加载特效</title>
    <style>
        *{
    /* 初始化 取消页面元素的内外边距 */
    margin: 0;
    padding: 0;
}
body{
    /* 100%窗口高度 */
    height: 100vh;
    /* 弹性布局 水平、垂直居中 */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
}
.container{
    width: 300px;
    height: 300px;
    /* 相对定位 */
    position: relative;
    /* 弹性布局 */
    display: flex;
    justify-content: center;
    align-items: center;
    /* 自定义属性--h 即色相 */
    --h: calc(var(--percent) / 100 * 360);
    /* hsl函数使用色相,饱和度,亮度来定义颜色 */
    color: hsl(var(--h), 100%, 75%);
    /* 执行动画:动画名称 时长 线性的 无限次播放 */
    animation: changecolor 5s linear infinite;
}
.container span{
    /* 绝对定位 */
    position: absolute;
    /* 自定义属性 可通过var函数进行调用 */
    --diameter: calc(50px + (var(--n) - 1) * 30px);
    width: var(--diameter);
    height: var(--diameter);
    border-style: solid;
    /* currentColor代表当前元素被应用上的color颜色值,如果当前元素没有在css里指定一个color值,那它的颜色值就从父级元素继承而来(这里父级元素还没有设置color,所以暂时看不到) */
    border-color: currentColor transparent;
    border-width: 10px 10px 0 0;
    border-radius: 50%;
    /* 执行动画: 动画名称 时长(暂时不设置) 线性的 无限次播放 */
    animation: rotating linear infinite;
    /* 计算并设置动画时长 */
    animation-duration: calc(5s / (9 - var(--n) + 1));
    /* 大致的效果已经出来了,接下来我们来改变颜色 */
}
/* 为每一个span元素设置自定义属性--n */
.container span:nth-child(1){
    --n: 1;
}
.container span:nth-child(2){
    --n: 2;
}
.container span:nth-child(3){
    --n: 3;
}
.container span:nth-child(4){
    --n: 4;
}
.container span:nth-child(5){
    --n: 5;
}
.container span:nth-child(6){
    --n: 6;
}
.container span:nth-child(7){
    --n: 7;
}
.container span:nth-child(8){
    --n: 8;
}
.container span:nth-child(9){
    --n: 9;
}
.bix{
    font-size: 60px;
    color: aliceblue;
    position: absolute;
    left: 44%;
    top: 200px;
}

/* 定义动画 */
/* 旋转 */
@keyframes rotating {
    to{
        /* 1turn表示一圈 */
        transform: rotate(1turn);
    }
}
/* 通过改变自定义属性--percent来改变颜色 */
@keyframes changecolor {
    0%,100%{
        --percent: 0;
    }
    10%{
        --percent: 10;
    }
    20%{
        --percent: 20;
    }
    30%{
        --percent: 30;
    }
    40%{
        --percent: 40;
    }
    50%{
        --percent: 50;
    }
    60%{
        --percent: 60;
    }
    70%{
        --percent: 70;
    }
    80%{
        --percent: 80;
    }
    90%{
        --percent: 90;
    }
}
    </style>
</head>

<body>
    <span class="bix">正在加载</span>
    <div class="container">
        <span></span>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
    </div>
</body>

</html>

10.方旗块加载效果

 

<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">

    <title>菱形加载动画</title>
    <style>
        body{
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(200deg,#f4efef,#e3eeff);
}
.loading{
    width: 200px;
    height: 200px;
    display: grid;
    /* 制作3列的网格容器 */
    grid-template-columns: repeat(3,1fr);
    /* 设置行与列之间的间隙 */
    grid-gap: 10px;
    /* 对子部分进行编号 */
    /* counter-reset: number; */
    /* 旋转45度 */
    transform: rotate(45deg);
}
.loading span{
    /* 自定义属性 */
    --c:red;
    /* 调用var函数使用自定义属性--c */
    background-color: var(--c);
    position: relative;
    transform: rotate(0);
    /* 执行动画:动画 时长 线性的 无限次播放 */
    animation: blinking 2s linear infinite;
    /* 动画延迟 */
    animation-delay: var(--d);
}
.loading span::before{
    /* 设置增量 */
    /* counter-increment: number; */
    /* 将编号赋值到content,这里有助于我们根据编号设置样式 */
    /* content: counter(number); */
    color: #fff;
    position: absolute;
    width: 100%;
    height: 100%;
}
.loading span:nth-child(7){
    --c:#f15a5a;
    --d:0s;
}
.loading span:nth-child(4),
.loading span:nth-child(8){
    --c:#f0c419;
    --d:0.2s;
}
.loading span:nth-child(1),
.loading span:nth-child(5),
.loading span:nth-child(9){
    --c:#4eba6f;
    --d:0.4s;
}
.loading span:nth-child(2),
.loading span:nth-child(6){
    --c:#2d95bf;
    --d:0.6s;
}
.loading span:nth-child(3){
    --c:#955ba5;
    --d:0.8s;
    /* 到这里基本完成了,我们来吧编号去掉吧 */
}
.bix{
    font-size: 60px;
    color: rgb(255, 0, 149);
    position: absolute;
    left: 44%;
    top: 200px;
}
/* 定义动画 缩放 */
@keyframes blinking{
    0%,100%{
        transform: scale(0);
    }
    40%,80%{
        transform: scale(1);
    }
}
    </style>
</head>

<body>
    <span class="bix">正在加载</span>
    <div class="loading">
        <span></span>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
    </div>
</body>

</html>

html经典菜单好看又好用
05-12
菜单只是个实例,要用的话还要改进。但大多多是ctrl+c ,ctrl+v的,好看好用,随便调。。
html5纯css实现导航栏特效
05-25
html5纯css实现导航栏特效!不适用任何js代码!需要看看的速下载
HTML侧边导航栏
热门推荐
jakelihua
10-19 1万+
本文用最简洁的语言,来教会读者,如果用html+css来制作,侧边导航栏,本案例以手机商城中的部分为例子来制作。
HTML入门】第二十课 - 【实战】做一个侧边栏菜单
最新发布
xingyu_qie的专栏
07-31 512
这一小节,我们还是继续练习纯HTML标签的内容,多练一些,把HTML标签练熟。这就像练武功前的扎马步和一些基本功,功底越深,后边才能练更高深的武功。这一小节,我们用纯HTML标签做一个侧边栏菜单的功能。
每日分享html特效之一个菜单栏、一个渐变背景、一个加载特效、七个导航栏特效
小淼淼的博客
09-24 2185
每日分享html特效之一个菜单栏、一个渐变背景、一个加载特效、七个导航栏特效
HTML5菜单特效
hzp666的博客
11-16 1万+
 今天向大家精选了10款超酷的HTML5/CSS3菜单,给你的网页添加不一样的精彩,一起来围观一下吧。 1、CSS3手风琴菜单 下拉展开带弹性动画 利用CSS3技术可以实现各种各样的网页菜单,我们之前也在CSS3菜单栏目中分享了许多CSS3菜单。今天我们分享的这款是CSS3手风琴菜单菜单项在展开和收缩的时候菜单项会有弹性动画效果。每一层父级菜单有一个小三角,菜单项在展开的时候这个小三角
html5网页导航栏特效,HTML5如何制作特效导航栏
weixin_35084134的博客
06-04 642
鼠标移上去时,改变li元素的大小、背景色、文字颜色等代码如下:<!DOCTYPEhtml><html><head><metacharset="utf-8"><title></title><styletype="text/css">ul{margin:0;padding:0;}ulli{list-style:none...
导航栏特效
besttoby01的博客
04-13 380
var that = this;wx.getSystemInfo({ success: function (res) { that.setData({ wh: res.windowHeight, navh: (res.windowHeight * 0.55 - res.windowHeight * 0.08) / 6 * 0.8, ...
JavaScript+CSS实现仿天猫侧边网页菜单效果
11-23
这个菜单设计具有二级分类,当鼠标悬停在主分类上时,二级分类会向右侧滑出展开,类似于当前许多电商网站如淘宝、天猫、京东所采用的导航菜单特效。 首先,我们需要理解HTML结构。在这个例子中,HTML代码包括一个主...
html5手机端弹出侧边栏滑动菜单代码.zip
07-04
在实际应用中,这样的侧边栏菜单通常会与Ajax结合,实现无刷新加载内容,提供更流畅的用户体验。通过发送异步请求,可以在不刷新整个页面的情况下更新侧边栏中的内容,提高网页性能。 总的来说,"html5手机端弹出侧...
CSS3左侧边栏3D酷炫导航展开效果jquery特效代码.zip
07-11
该资源是一个基于CSS3和jQuery实现的左侧边栏3D酷炫导航展开效果的代码库,适用于企业网站或商城网站的界面设计。这个特效能够为用户带来动态且富有视觉冲击力的浏览体验,提升网站的专业性和吸引力。 首先,我们要...
一个HTML5底部导航栏特效.rar
07-10
一个HTML5底部导航栏特效,显示在网页最底部的小菜单栏,页脚导航特效,带动画特效,右侧还有小图标,美化的挺漂亮,CSS3代码,运行于支持HTML5的浏览器中,移动设备的浏览器效果最佳。
菜单特效 菜单导航
01-25
8种菜单特效 样式,做网页时经常用的到。
HTML5响应式导航菜单特效
04-06
HTML5响应式导航菜单特效是一款非常实用的宽屏导航菜单ui布局特效
基于html和CSS3制作酷炫的导航栏
12-13
主要亮点:   1 ul 水平显示   2 li 去掉圆点   3 li中字体水平、竖直居中   4 li控制边框样式   5 使用html + css3 渐变画图 制作背景图片   6 更改颜色透明度   7 DIV制作边框阴影 先看效果图:   CSS Code复制内容到剪贴板 <!doctype html>      html lang="en">      <head>       <meta charset="UTF-8"> <!—-编码—–>       <meta name="Generator" content="EditPlus
红色的html导航栏模板
06-08
红色的html导航栏模板 比较漂亮 界面效果好
jQuery和CSS3炫酷垂直固定侧边栏导航菜单特效
04-25
"jQuery和CSS3炫酷垂直固定侧边栏导航菜单特效"是一个结合了这两种技术实现的创新设计,旨在为网站增添动态交互性和视觉吸引力。 首先,让我们了解一下jQuery。jQuery是一个广泛使用的JavaScript库,它简化了...
基于jquery和Bootstrap3的隐藏侧边栏菜单
12-10
【基于jQuery和Bootstrap3的隐藏侧边栏菜单】 在网页设计中,用户界面的交互性和可访问性至关重要,尤其在响应式布局日益流行的今天。基于jQuery和Bootstrap3的隐藏侧边栏菜单是一种优化用户体验的方式,它能有效地...
html导航简单特效,简单好用的导航特效
weixin_33977572的博客
06-04 344
#menu{margin-top: 20px;background: linear-gradient(RGBA(194,1,4,1),RGBA(199,6,9,1),RGBA(204,11,14,1),RGBA(209,16,19,1),RGBA(214,21,24,1),RGBA(209,16,19,1),RGBA(204,11,14,1),RGBA(199,6,9,1),RGBA(194,1,...
写一个html+css简单的侧边导航栏
04-20
好的,下面是一个简单的侧边导航栏HTML和CSS代码: HTML代码: ``` <div class="sidebar"> <ul> <li><a href="#">首页</a></li> <li><a href="#">新闻</a></li> <li><a href="#">产品</a></li> <li><a href="#">关于我们</a></li> <li><a href="#">联系我们</a></li> </ul> </div> ``` CSS代码: ``` .sidebar { background-color: #f1f1f1; height: 100%; width: 200px; position: fixed; top: 0; left: 0; } .sidebar ul { list-style-type: none; margin: 0; padding: 0; } .sidebar li { margin: 10px 0; } .sidebar a { display: block; padding: 10px; color: #000; text-decoration: none; } .sidebar a:hover { background-color: #ddd; } ``` 以上代码可以创建一个灰色的固定侧边栏,包括一个标题和几个链接,鼠标悬停链接时链接的背景色会变成灰色。您可以在自己的项目中根据需要进行修改和调整。
写文章

热门文章

  • python进阶——人工智能视觉识别 18821
  • python进阶——自动驾驶寻找车道 17649
  • 二十分钟秒懂:实现前后端分离开发(vue+element+spring boot+mybatis+MySQL) 14903
  • 前端必备:五大css自动化生成网站(稀有级别!) 11666
  • 简化后端:一篇带你走进云开发及小程序云开发的世界 9572

分类专栏

  • 【宝剑出鞘】 付费 11篇
  • 鸿蒙os 5篇
  • node 2篇
  • 推广 9篇
  • 算法 1篇
  • 直击毕设 1篇
  • 淼哥送书计划 1篇
  • 积水成渊 3篇
  • uni-cloud(PC端)实战一百套 1篇
  • uni-cloud(移动端)实战一百套
  • 《微信小程序云开发之路 1篇
  • PythonWeb 8篇
  • YOLOV5系列 1篇
  • python人工智能视觉(opencv)从入门到实战 23篇
  • python 18篇
  • cocos游戏引擎 1篇
  • vue 22篇
  • 云开发介绍 2篇
  • 前端 24篇
  • 自我沉淀 4篇
  • 微信小程序 27篇
  • uni-app 11篇
  • mysql数据库 1篇

最新评论

  • AI全栈工程师的新舞台:Coze(扣子)

    愚公搬代码: 小队不仅是一个交流分享的平台,更是一个不断成长的机会。活动安排都很到位。希望大家能够加入这个大家庭互相成长。

  • python人工智能【隔空手势控制鼠标】“解放双手“

    蒙城小亮: 很棒的一篇文章

  • ArkTS开发鸿蒙OS连接mongoDB(后端node.js)2024最新教程

    小胡想找到工作: Button('查询') .width(200) .onClick(()=>{ axios({ method: "get", url: 'http://localhost:3000/find/'+this.shangchuan_xingming_find, }).then(res=> { console.info('result:' + JSON.stringify(res.data)); }).catch(error=> { console.error(error); }) })Use explicit types instead of "any", "unknown" (arkts-no-any-unknown) <ArkTSCheck>大佬devstudio-next版本这里的res要报错

  • 仿排号系统(微信小程序云开发)

    我想开个店: “还有多个人的信息是不关联的,也就是各排各的怎么办呀呜呜呜”是啊怎么解决

  • 二十分钟秒懂:实现前后端分离开发(vue+element+spring boot+mybatis+MySQL)

    Recool_: 这个是不是要先在MySQL中船建数据库啊?而且MySQL中初始的数据是怎么初始化的?要先在MySQL中写出来初始数据吗表情包

最新文章

  • AI全栈工程师的新舞台:Coze(扣子)
  • 基于langchain+千帆sdk的一个基于文档的QA问答Demo
  • 实验+论证!AI + agent(个性化智能体)的必要发展趋势
2024年17篇
2023年99篇
2022年65篇

目录

目录

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

淼学派对

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或 充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值

天下网标王网站优化难点怎么处理网站优化页面shell优化网站网站优化服务运营湖北外包网站优化晋中网站优化多少钱张家口专业的网站优化哪家专业北塘区网站优化排名乳山网站的优化优化网站软件诚信火24星到口碑好的网站排名优化系统河北建材行业网站优化推广可靠吗网站百度排名优化seo从哪几个方面优化网站如何优化网站用户体验曲阜关键词网站优化如何选择网站制作优化公司平顶山网站推广优化收费标准虹口区360网站优化方案深圳国内网站优化广告苏州网站建设优化爱采购新站如何优化网站韶关推荐免费网站优化宜兴网站优化推广工作室网站优化最为重要的内容是福州市优化网站公司排名开平专业的网站优化哪家好网站优化推广平台宿迁品质网站优化反馈正规的seo网站优化费用香港通过《维护国家安全条例》两大学生合买彩票中奖一人不认账让美丽中国“从细节出发”19岁小伙救下5人后溺亡 多方发声卫健委通报少年有偿捐血浆16次猝死汪小菲曝离婚始末何赛飞追着代拍打雅江山火三名扑火人员牺牲系谣言男子被猫抓伤后确诊“猫抓病”周杰伦一审败诉网易中国拥有亿元资产的家庭达13.3万户315晚会后胖东来又人满为患了高校汽车撞人致3死16伤 司机系学生张家界的山上“长”满了韩国人?张立群任西安交通大学校长手机成瘾是影响睡眠质量重要因素网友洛杉矶偶遇贾玲“重生之我在北大当嫡校长”单亲妈妈陷入热恋 14岁儿子报警倪萍分享减重40斤方法杨倩无缘巴黎奥运考生莫言也上北大硕士复试名单了许家印被限制高消费奥巴马现身唐宁街 黑色着装引猜测专访95后高颜值猪保姆男孩8年未见母亲被告知被遗忘七年后宇文玥被薅头发捞上岸郑州一火锅店爆改成麻辣烫店西双版纳热带植物园回应蜉蝣大爆发沉迷短剧的人就像掉进了杀猪盘当地回应沈阳致3死车祸车主疑毒驾开除党籍5年后 原水城县长再被查凯特王妃现身!外出购物视频曝光初中生遭15人围殴自卫刺伤3人判无罪事业单位女子向同事水杯投不明物质男子被流浪猫绊倒 投喂者赔24万外国人感慨凌晨的中国很安全路边卖淀粉肠阿姨主动出示声明书胖东来员工每周单休无小长假王树国卸任西安交大校长 师生送别小米汽车超级工厂正式揭幕黑马情侣提车了妈妈回应孩子在校撞护栏坠楼校方回应护栏损坏小学生课间坠楼房客欠租失踪 房东直发愁专家建议不必谈骨泥色变老人退休金被冒领16年 金额超20万西藏招商引资投资者子女可当地高考特朗普无法缴纳4.54亿美元罚金浙江一高校内汽车冲撞行人 多人受伤

天下网标王 XML地图 TXT地图 虚拟主机 SEO 网站制作 网站优化