博客首页效果

news2024/9/21 0:35:02

在这里插入图片描述
学习来自风`宇blog的博客首页效果

  • 全部用的基本上都是原生的html,css,js
  • 特别是flex布局的使用,主轴方向可以是横轴,也可以是纵轴,弹性项还可可以使用百分比
  • sticky粘性布局,作为侧边栏,它不会超出右边的整体范围,也不会丢失原来所占的空间(相对定位特性),能固定在离浏览器窗口10px的位置不动(固定定位)
  • 只要给元素加上动画,在页面一加载的时候,就会播放动画。可以在浏览器样式控制台,点击取消或勾选animation选项,可以查看动画效果,这个取消或勾选的动作就相当于是js在操作。
  • 没有作响应式…
<style lang="scss">
@import url('//at.alicdn.com/t/c/font_4004562_8c8umr3qxuh.css');

* {
    margin: 0;
    padding: 0;
    list-style: none;
    text-decoration: none;
    box-sizing: border-box;
}

.shadow {
    box-shadow: 0 4px 8px 6px rgba(7, 17, 27, .06) !important;
}

a {
    color: inherit;
}

.verticle-line {
    margin: 3px;
}

body {
    overflow-x: hidden;
    overflow-y: auto;
    /* 背景渐变 */
    background: linear-gradient(90deg, rgba(247, 149, 51, .1), rgba(243, 112, 85, .1) 15%, rgba(239, 78, 123, .1) 30%, rgba(161, 102, 171, .1) 44%, rgba(80, 115, 184, .1) 58%, rgba(16, 152, 173, .1) 72%, rgba(7, 179, 155, .1) 86%, rgba(109, 186, 130, .1));
}

/* 封面图下移效果 */
@keyframes slidedown {
    0% {
        opacity: 0.3;
        transform: translateY(-60px);
    }

    100% {
        opacity: 1;
        transform: translateY(0px);
    }
}

.slidedown {
    animation: slidedown 1s;
}

/* 内容上移效果 */
@keyframes slideup {
    0% {
        opacity: 0.3;
        transform: translateY(60px);
    }

    100% {
        opacity: 1;
        transform: translateY(0px);
    }
}

.slideup {
    animation: slideup 1s;
}

/* 从小变大效果 */
@keyframes scaleup {
    0% {
        transform: scale(0.3);
    }

    100% {
        transform: scale(1);
    }
}

.scaleup {
    animation: scaleup 1s;
}

/* 箭头下滑 */
@keyframes arrowSlideDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    50% {
        opacity: 1;
        transform: translateY(0px);
    }

    100% {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* 光标闪烁 */
@keyframes shanshuo {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* 箭头滑向右边 */
@keyframes arrowSlideRight {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }

    50% {
        opacity: 1;
        transform: translateX(0px);
    }

    100% {
        opacity: 0;
        transform: translateX(5px);
    }
}

.arrow-right-move {
    animation: arrowSlideRight 3s infinite;
}

/* 头像旋转 */
@keyframes rotateAround {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.rotateForever {
    animation: rotateAround 5s linear infinite;
}

.avatar:hover {
    animation-play-state: paused;
}

/* 公告摆动 */
@keyframes wave {
    0% {
        transform: rotate(350deg);
    }

    100% {
        transform: rotate(370deg);
    }
}

.wave {
    animation: wave 1.3s infinite ease-in-out alternate-reverse;
    transform-origin: 50% 0;
    display: inline-block;
}

.shouye-cover {
    height: 100vh;
    width: 100vw;
    background-image: url(@/assets/bg1.jpg);
    background-size: cover;
    background-position: center;

    display: flex;

    color: #eee;

    .shouye-intro {
        margin-top: 40vh;
        width: 100%;
        text-align: center;

        font-size: 18px;

        .shouye-title {
            margin-bottom: 10px;
        }

        .shouye-desc {
            span {
                animation: shanshuo 1s infinite;
            }
        }

    }

    .arrow-down {
        position: absolute;
        width: 100%;
        height: 90px;
        bottom: 0;
        text-align: center;

        i {
            font-size: 32px;
            cursor: pointer;
            display: inline-block;
            animation: arrowSlideDown 2s infinite;
        }
    }


}

.shouye-content {
    max-width: 1200px;
    // border: 1px solid red;
    margin: 0 auto 20px;
    padding: 10px;
    display: flex;
    color: #595655;

    .content-wrapper {
        width: 75%;
        padding: 12px;
        // border: 1px solid red;

        .shuoshuo {
            background-color: #fff;
            padding: 10px;
            display: flex;
            cursor: pointer;
            border-radius: 8px;
            margin-bottom: 20px;
        }

        .content:last-child {
            .article-item {
                margin-bottom: 0;
            }
        }

        .content {

            .article-item {
                margin-bottom: 20px;
                display: flex;
                align-items: center;
                height: 300px;
                background-color: #fff;
                border-radius: 8px;
                overflow: hidden;

                .article-cover {
                    width: 45%;
                    height: 100%;

                    overflow: hidden;

                    img {
                        width: 100%;
                        height: 100%;
                        transition: all 0.5s;

                        &:hover {
                            transform: scale(1.1);
                        }
                    }
                }

                .article-info {
                    width: 55%;
                    margin: 0 20px;

                    .article-title {
                        font-size: 24px;
                        cursor: pointer;
                        transition: all 0.3s;

                        &:hover {
                            color: #30adff;
                        }
                    }

                    .article-intro {
                        font-size: 12px;
                        margin: 8px 0;
                        color: #a7a7a7;
                        display: inline-flex;
                        align-items: center;
                        margin-left: 5px;

                        i {
                            margin-right: 5px;
                        }

                    }

                    .article-text {
                        text-indent: 2em;
                        display: -webkit-box;
                        -webkit-box-orient: vertical;
                        -webkit-line-clamp: 3;
                        overflow: hidden;
                    }
                }

                .article-text {
                    word-break: break-all;
                }
            }
        }
    }

    .sider-wrapper {
        width: 25%;
        // border: 1px solid red;
        padding: 12px;

        .sider-sticky {
            position: sticky;
            top: 20px;
        }

        .author {
            background-color: #fff;
            padding: 20px;
            border-radius: 8px;
            display: flex;
            flex-direction: column;
            align-items: center;
            box-shadow: 1px 0 0 0 rgba(0, 0, 0, 0.3);
            line-height: 1.5;
            margin-bottom: 15px;

            .avatar {
                width: 116px;
                height: 116px;
                display: block;
                border-radius: 50%;
                overflow: hidden;
                border: 2px solid rgb(230, 230, 230);

                img {
                    width: 100%;
                    height: 100%;
                }
            }

            .author-name {
                color: #4c4948;
                font-size: 24px;

            }

            .author-bio {
                font-size: 14px;
                margin-top: 10px;
            }

            .author-statis {
                display: flex;
                margin-top: 10px;
                width: 100%;
                padding: 0 10px;

                .author-statis-item {
                    flex: 1;
                    display: flex;
                    flex-direction: column;
                    align-items: center;

                    .author-statis-item-name {
                        margin-bottom: 10px;
                    }
                }
            }

            .join-label {
                height: 30px;
                background-color: #49b1f5;
                width: 100%;
                text-align: center;
                line-height: 30px;
                color: #fff;
                font-size: 0.845em;
                margin-top: 10px;
                cursor: pointer;
                z-index: 1;

                position: relative;

                i {
                    font-size: 0.875em;
                }

                &:hover {
                    animation-name: pulse;
                }

            }

            .author-links {
                margin-top: 10px;
                display: flex;

                a {
                    // border: 1px solid red;
                    display: block;
                    margin: 0 5px;
                    height: 1.8em;
                    width: 1.8em;
                    display: flex;
                    align-items: center;
                    justify-content: center;


                    i {
                        font-size: 1.6em;

                        &.gitee {
                            font-size: 1.4em !important;
                            color: #c71d23;
                        }

                        &.weibo {
                            font-size: 1.8em !important;
                        }

                        &.qq {
                            color: #08bdfd;
                        }
                    }
                }

            }
        }

        .notice {
            padding: 20px;
            background-color: #fff;
            margin-bottom: 15px;
            border-radius: 8px;

            line-height: 2;

            .notice-header {
                margin-bottom: 5px;
            }

            i {
                margin-right: 5px;
            }
        }

        .site-info {
            padding: 20px;
            background-color: #fff;
            border-radius: 8px;

            line-height: 2;

            .site-info-header {
                margin-bottom: 5px;
            }

            i {
                margin-right: 5px;
            }

            .site-info-content {
                .site-info-item {
                    display: flex;
                    justify-content: space-between;
                }
            }

        }

    }

}

.shouye-footer {
    height: 136px;
    background: linear-gradient(-45deg,#ee7752,#ce3e75,#23a6d5,#23d5ab);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    p {
        line-height: 2em;
        color: #eee;
        font-size: 0.875em;
        user-select: none;
    }
}
</style>

<template>
    <div class="shouye">
        <navbar />
        <div class="shouye-cover slidedown">
            <div class="shouye-intro">
                <h1 class="shouye-title scaleup">PSCOOL</h1>
                <div class="shouye-desc scaleup">
                    南朝四百八十寺, 多少楼台烟雨中
                    <span>|</span>
                </div>
            </div>
            <div class="arrow-down" @click="scrollDown">
                <i class="iconfont icon-a-xiala2"></i>
            </div>
        </div>
        <div class="shouye-content slideup">

            <div class="content-wrapper">
                <a href="#" class="shuoshuo shadow scaleup">
                    <i class='iconfont icon-message'></i>
                    <div style="width: 100%;text-align: center;">follow your heart and get it~</div>
                    <i class='iconfont icon-youshuangjiantou arrow-right-move'></i>
                </a>

                <div v-for="i of 5" :key="i" class="content">
                    <div class="article-item shadow scaleup">
                        <a href="#" class="article-cover">
                            <img src="@/assets/article-cover.jpg" alt="">
                        </a>
                        <div class="article-info">
                            <a href="#" class="article-title">@Configuration注解的full模式和lite模式</a>
                            <div class="article-intro">
                                <i class="iconfont icon-rili"></i>
                                <span>2023-04-01</span>
                                <span class="verticle-line">|</span>
                                <i class="iconfont icon-wenjian"></i><span>默认</span>
                                <span class="verticle-line">|</span>
                                <i class="iconfont icon-biaoqian"></i><span>默认</span>
                            </div>
                            <div class="article-text">
                                标注有@Configuration或者@Configuration(proxyBeanMethods =
                                true)的类被称为Full模式的配置类,proxyBeanMethods默认为TRUE。在常见的场景中,@Bean方法都会在标注有@Configuration的类中声明,以确保总是使用“Full模式”,这么一来,交叉方法引用会被重定向到容器的生命周期管理,所以就可以更方便的管理Bean依赖。
                            </div>
                        </div>
                    </div>
                </div>
            </div>


            <div class="sider-wrapper">

                <div class="sider-sticky">

                    <div class="author shadow scaleup">
                        <a href="#" class="avatar rotateForever"  style="width: 56px;height: 56px;">
                            <img src="@/assets/avatar.jpg" alt="">
                        </a>
                        <div class="author-name">
                            zzhua
                        </div>
                        <div class="author-bio">
                            热爱技术, 一点点的学习
                        </div>
                        <div class="author-statis">
                            <a href="#" class="author-statis-item">
                                <div class="author-statis-item-name">文章</div>
                                <div>9</div>
                            </a>
                            <a href="#" class="author-statis-item">
                                <div class="author-statis-item-name">分类</div>
                                <div>6</div>
                            </a>
                            <a href="#" class="author-statis-item">
                                <div class="author-statis-item-name">标签</div>
                                <div>7</div>
                            </a>
                        </div>

                        <div class="join-label animate__animated">
                            <i class="iconfont icon-24gl-bookmark"></i>
                            加入书签
                        </div>

                        <div class="author-links">
                            <a href="#">
                                <i class="iconfont icon-QQ-circle-fill qq"></i>
                            </a>
                            <a href="https://gitee.com/zzhua195" target="_blank">
                                <i class="iconfont icon-gitee-fill-round gitee"></i>
                            </a>
                            <a href="#">
                                <i class="iconfont icon-weibo weibo"></i>
                            </a>
                        </div>

                    </div>

                    <div class="notice shadow scaleup">
                        <div class="notice-header">
                            <i class="iconfont icon-gonggao wave"></i>公告
                        </div>
                        <div class="notice-content">
                            欢迎来到我的博客~
                        </div>
                    </div>

                    <div class="site-info shadow scaleup">
                        <div class="site-info-header">
                            <i class="iconfont icon-tongji"></i>网站资讯
                        </div>
                        <div class="site-info-content">
                            <div class="site-info-item">
                                <span>运行时间: </span>
                                <span>48天17时19分25秒</span>
                            </div>
                            <div class="site-info-item">
                                <span>总访问量: </span>
                                <span>102</span>
                            </div>
                        </div>
                    </div>
                </div>

            </div>

        </div>
        <div class="shouye-footer">
            <p>&copy;2023 - 2023 By zzhua</p>
            <p>备案号: xxx</p>
        </div>
    </div>
</template>

<script>
import Navbar from './Navbar.vue';
export default {
    name: 'Shouye',
    methods: {
        scrollDown() {
            window.scroll({
                top: document.documentElement.clientHeight,
                behavior: 'smooth'
            })
        }
    },
    components: {
        Navbar
    }
}
</script>


本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/417065.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Spring Cloud组件源码之OpenFeign源码分析

" Spring 到底是春天的来临万物复苏&#xff0c;还是春转夏的干燥又炎热呢&#xff1f;" Spring的来临让JavaEE走向了另一个高度。便捷的开发&#xff0c;完美的生态。物极必反&#xff0c;学习Spring的成本越来越低&#xff0c;导致Java程序员越来越密集&#xff0…

实习不对口,还去吗?

作者&#xff1a;阿秀校招八股文学习网站&#xff1a;https://interviewguide.cn这是阿秀的第「255」篇原创小伙伴们大家好&#xff0c;我是阿秀。欢迎今年参加秋招的小伙伴加入我的学习圈&#xff0c;目前已经超过 2200 小伙伴加入&#xff01;去年认真准备和走下来的基本都拿…

LBS计算附近的对象:MySQL 空间索引方式

目录1. MySQL空间数据类型的基本介绍1.1 什么是MySQL空间数据类型1.2 有哪些空间数据类型1.3 支持空间数据类型的引擎1.4 坐标系类型2. 存储坐标系的示例代码2.1 geomtry和point都可以存储坐标系&#xff0c;有什么区别呢&#xff1f;2.2 创建测试表2.3 新增坐标2.3 计算两地之…

计组2.1——计算机中的数据

问题&#xff1a;数据如何在计算机中表示&#xff1f; 运算器如何进行数字运算和逻辑运算&#xff1f; 计组2.11.进制转化&#xff1a;2. BCD码3.字符和字符串1.ASCII2.汉字编码3.字符串4.奇偶校验码1. 校验原理3. 奇偶校验5.汉明码6.循环冗余校验码1.进制转化&#xff1a; #me…

【C语言】关于文件操作你知多少?

目录 一.引入 二. 什么是文件 2.1 什么是文件 2.2 程序文件 2.3 数据文件 2.4 文件名 三.文件的打开和关闭 3.1 文件指针 3.2 文件的打开和关闭 四.文件的顺序读写 4.1 函数汇总 4.2 printf/fprintf/sprintf 4.3 scanf/fscanf/sscanf 五. 文件的随机读写 5.1 引入 5.2 fsee…

HTML5 <ins> 标签、HTML5 <link> 标签

HTML5 <ins> 标签 实例 一段带有已删除部分和新插入部分的文本&#xff1a; <p>My favorite color is <del>blue</del> <ins>red</ins>!</p> 尝试一下 浏览器支持 所有主流浏览器都支持 <ins> 标签。 标签定义及使用说明 …

Sentry安装使用(最全最细)

Sentry安装使用(最全最细&#xff0c;包括解决邮箱发送问题&#xff0c;https上传问题&#xff0c;https访问问题&#xff0c;安装此教程配置即可) ##服务器操作系统为2核8G,CentOS7.9 ##安装Docker-ce yum install -y yum-utils \device-mapper-persistent-data \lvm2yum-c…

日撸 Java 三百行day27

文章目录说明day27 Hanoi 塔问题1.思路2.代码3.图示说明 闵老师的文章链接&#xff1a; 日撸 Java 三百行&#xff08;总述&#xff09;_minfanphd的博客-CSDN博客 自己也把手敲的代码放在了github上维护&#xff1a;https://github.com/fulisha-ok/sampledata day27 Hanoi 塔…

部署LAMP架构和论坛

引言 LAMP架构是目前成熟的企业网站应用模式之一&#xff0c;指的是协同工作的一整套系统和相关软件&#xff0c;能够提供动态Web站点服务及其应用开发环境。LAMP是一个缩写词&#xff0c;具体包括Linux操作系统、Apache网站服务器、MySQL数据库服务器、PHP&#xff08;或Perl、…

Win10,详细永久关闭更新方法(附图文)

一、服务设置 1.同时按下键盘 Win R&#xff0c;打开运行对话框&#xff0c;然后输入命令 services.msc &#xff0c;点击下方的“确定”打开服务。 2.找到 Windows Update 这一项&#xff0c;并双击打开。 3.停止该服务&#xff0c;启动类型设置为禁用 4.点击恢复&#…

webrtc入门系列(二)easy_webrtc_server 入门example测试

《webrtc入门系列&#xff08;一&#xff09;easy_webrtc_server 入门环境搭建》 《webrtc入门系列&#xff08;二&#xff09;easy_webrtc_server 入门example测试》 《webrtc入门系列&#xff08;三&#xff09;云服务器coturn环境搭建》 《webrtc入门系列&#xff08;四&…

好用的免费 PDF 密码删除工具有哪些?

被锁定在文档之外可能会令人沮丧&#xff0c;尤其是当唯一挡路的是一个讨厌的弹出窗口要求您输入密码时。 如果您创建了 PDF 文档或有权访问它&#xff0c;您可以尝试一些行之有效的技巧来删除密码保护。 例如&#xff0c;您可以使用网络浏览器或文档阅读器中的打印设置将 PD…

Windows权限提升—令牌窃取、UAC提权、进程注入等提权

Windows权限提升—令牌窃取、UNC提权、进程注入等提权1. 前言2. at本地命令提权2.1. 适用范围2.2. 命令使用2.3. 操作步骤2.3.1. 模拟提权2.3.2. at配合msf提权2.3.2.1. 生成木马文件2.3.2.2. 设置监听2.3.2.3. 设置反弹2.3.2.4. 查看反弹效果3. sc本地命令提权3.1. 适用范围3.…

QT在线换源安装

Win11上Pytorch的安装并在Pycharm上调用PyTorch最新超详细 网上资源越来越多&#xff0c;关于PyTorch的安装教程各式各样&#xff0c;下面我将详细介绍在安装过程中的操作步骤。 经过上述流程图的介绍我们心中对安装过程有了一个大致的轮廓。下面我将对每一步进行细致的说明 步…

深度分析Palantir的投资价值,Palantir2023年将实现强劲反弹?

来源&#xff1a;猛兽财经 作者&#xff1a;猛兽财经 在本文中&#xff0c;猛兽财经将通过对Palantir的股票关键指标、商业模式、盈利能力、影响Palantir2023年股价的关键利好因素等方面&#xff0c;对Palantir进行全面、深度的分析。 Palantir股票的关键指标 自从Palantir(PL…

p74 应急响应-winlinux 分析后门勒索病毒攻击

数据来源 操作系统(windows,linux)应急响应&#xff1a; 常见危害&#xff1a;暴力破解&#xff0c;漏洞利用&#xff0c;流量攻击&#xff0c;木马控制(Webshell,PC 木马等)&#xff0c;病毒感染(挖矿&#xff0c;蠕虫&#xff0c;勒索等)常见分析&#xff1a;计算机账户&…

postman汉化教程

文章目录1. 下载对应版本的postman2.下载对应版本的汉化包2.1. github下载地址 : &#xff08;9.12.2&#xff09;2.2 百度网盘&#xff08;9.12.2&#xff09;3. 打开postman安装位置4. 压缩包解压到/resources目录下5. 重启postman即可汉化成中文了1. 下载对应版本的postman …

Runtime命令参数字符串和数组比较

问题 最近有个问题本地执行 ssh -p 8084 root10.224.122.51 \"ssh -p 22 root192.168.5.157 mkdir -p /opt/dw-release/pdld-admin\"程序执行总是报错&#xff1a; No such file or directory 但是直接在终端执行正常&#xff0c;这就很奇怪。肯定能推出是程序执行…

OSI七层网络模型与TCP/IP四层模型

一、OSI七层网络模型 OSI 七层模型 是国际标准化组织提出一个网络分层模型&#xff0c;其大体结构以及每一层提供的功能如下图所示&#xff1a; 但由于各方面原因&#xff0c;OSI 七层模型并没有被广泛应用&#xff0c;更多的是作为网络分层的一种基础理论模型。 二、TCP/IP…

Oauth2+vue前后端实现单点登录

Oauth2单点登录流程实现 oauth2-demo 介绍 这是一个基于spring cloud oauth2和vue实现的前后端分离的单点登录示例。示例代码:szile/oauth2-demo 后端服务 auth-server 认证服务 ,对应域名:auth.szile.com auth-client 资源服务,对应域名:client.szile.com 角色 浏览器…