博客首页效果

在这里插入图片描述
学习来自风`宇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.mfbz.cn/a/8132.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

分享一个国内可用的免费ChatGPT网站

背景 ChatGPT作为一种基于人工智能技术的自然语言处理工具&#xff0c;近期的热度直接沸腾&#x1f30b;。 作为一个程序员&#xff0c;我也忍不住做了一个基于ChatGPT的网站&#xff0c;免费&#xff01;免登陆&#xff01;&#xff01;国内可直接对话ChatGPT&#xff0c;也…

c++类和对象

&#x1f646;&#x1f3fc;关注作者&#xff1a;玺子写代码 ✍️gitee&#xff1a;玺子写代码 目录&#x1f449;&#x1f3fb;类的定义&#x1f449;&#x1f3fd;类的两种定义方式&#x1f449;&#x1f3fc;类的访问限定符及封装&#x1f449;&#x1f3fd;访问限定符&…

ML@sklearn@ML流程Part3@AutomaticParameterSearches

文章目录Automatic parameter searchesdemomodel_selection::Hyper-parameter optimizersGridSearchCVegRandomizedSearchCVegNoteRandomForestRegressorMSEpipeline交叉验证&#x1f388;egL1L2正则Next stepsUser Guide vs TutorialAutomatic parameter searches Automatic p…

6 计时器(一)

计时器 6.1 TIM TIM简介 TIM&#xff08;Timer&#xff09;定时器 定时器可以对输入的时钟进行计数&#xff0c;并在计数值达到设定值时触发中断 16位计数器、预分频器、自动重装寄存器的时基单元&#xff0c;在72MHz计数时钟下可以实现最大59.65s的定时 不仅具备基本的定时中…

如何在现实场景中随心放置AR虚拟对象?

随着AR的发展和电子设备的普及&#xff0c;人们在生活中使用AR技术的门槛降低&#xff0c;比如对于不方便测量的物体使用AR测量&#xff0c;方便又准确&#xff1b;遇到陌生的路段使用AR导航&#xff0c;清楚又便捷&#xff1b;网购时拿不准的物品使用AR购物&#xff0c;体验更…

Spring-aop面向切面

1、理解必要的专业术语 先看看上面图&#xff0c;这是我的个人理解。(画的丑&#xff0c;主打真实) 1&#xff09;Advice&#xff0c;通知/增强&#xff1a;类方法中提出来的共性功能(大白话就是提出来的重复代码) 2&#xff09;Pointcut&#xff0c;切入点/切点&#…

centos7修改ip

准备项目 项目开发工具 Visual Studio Code 1.44.2 版本: 1.44.2 提交: ff915844119ce9485abfe8aa9076ec76b5300ddd 日期: 2020-04-16T16:36:23.138Z Electron: 7.1.11 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Windows_NT x64 10.0.19044 项目…

uniapp国际化配置

1、创建资源文件 创建一个locale文件夹&#xff0c;新增index.js,en.json,zh-hans.json 2.配置locale文件夹中的index.js文件 import Vue from vue import VueI18n from vue-i18n// v8.x import en from ./en.json import zhHans from ./zh-Hans.json import zhHant from .…

Redis大key问题

Redis大key问题 什么是big key&#xff1f; bigKey的危害&#xff1a; 大key不仅仅是占用内存而已&#xff0c;如果是仅仅内存的问题 那么扩大内存就好了。禁止大key是主要是因为你操作redis&#xff0c;比如说读/写等操作redis的时候 会有io操作&#xff0c;大key会导致io操作…

【K8S】k8s中secret使用方法

secret可以加密用户名和密码文件&#xff0c;将其打包成一个secret并在API服务器上创建对象 echo -n admin > ./username.txt echo -n xvagaxx > ./password.txt将username.txt和password.txt打包成secret kubectl create secret generic db-user-pass \--from-file./u…

【Mysql系列】——详细剖析数据库中的存储引擎

【Mysql系列】——详细剖析数据库中的存储引擎&#x1f60e;前言&#x1f64c;存储引擎什么是存储引擎&#xff1f;Mysql的体系结构&#xff1a;Mysql的体系结构分为四层&#xff1a;连接层服务层引擎层存储层存储引擎的查看存储引擎的指定存储引擎的特点InnoDB介绍InnoDB特点I…

客户反馈终极指南

客户反馈包括客户在交易后分享的有关产品或服务体验的所有信息、问题和输入。 客户反馈可帮助公司改善他们提供的客户体验&#xff0c;并可以在企业内产生积极的变化和增长。无论是正面的还是负面的&#xff0c;客户反馈都有助于调整您的产品和服务&#xff0c;以满足并超越客户…

基于vivado(语言Verilog)的FPGA学习(5)——跨时钟处理

基于vivado&#xff08;语言Verilog&#xff09;的FPGA学习&#xff08;5&#xff09;——跨时钟处理 1. 为什么要解决跨时钟处理问题 慢时钟到快时钟一般都不需要处理&#xff0c;关键需要解决从快时钟到慢时钟的问题&#xff0c;因为可能会漏信号或者失真&#xff0c;比如&…

Python零基础自学

很多零基础想做程序员的同学&#xff0c;最开始接触的基本上都是 Python 作为常年霸榜的 “最好上手的编程语言” ——Python&#xff0c;深受互联网大厂的喜爱。 而很多小伙伴反应&#xff0c;在刚开始学Python时遇到不少问题&#xff1a; 比如找不到学习资源&#xff0c;不…

Linux系统centos7关闭防火墙命令

CentOS 7使用的防火墙是firewalld&#xff0c;要关闭防火墙可以使用以下命令&#xff1a; 1. 停止firewalld服务&#xff1a; systemctl stop firewalld 2. 禁止firewalld服务开机启动&#xff1a; systemctl disable firewalld 3. 查看firewalld服务状态&#xff1a; sys…

java 线程池

一.简单的线程池设计&#xff1a; 线程池的执行示意图&#xff1a; 二. 线程池的核心参数&#xff1a; 三.线程池的处理流程&#xff1a; 四.线程池的阻塞队列&#xff1a; 1.基于数组的有界阻塞队列 2.基于链表的有界阻塞队列 3.基于链表的无界阻塞队列 4.同步移交阻塞队列…

2003-2019年各省专利申请和授权量数据/2003-2019年31省专利申请和授权量数据

2003-2019年各省专利申请和授权量数据/2003-2019年31省专利申请量和授权量数据 2003-2019年各省专利申请和授权量数据/2003-2019年31省专利申请和授权量数据 1、时间&#xff1a;2003-2019年 2、来源&#xff1a;国家知识产权专利数据库 3、指标&#xff1a;专利申请数、发…

数据结构和算法(一):复杂度、数组、链表、栈、队列

从广义上来讲&#xff1a;数据结构就是一组数据的存储结构 &#xff0c; 算法就是操作数据的方法 数据结构是为算法服务的&#xff0c;算法是要作用在特定的数据结构上的。 10个最常用的数据结构&#xff1a;数组、链表、栈、队列、散列表、二叉树、堆、跳表、图、Trie树 10…

办公协作效率想提质增效,可借助开源大数据工具!

在信息爆炸式发展的今天&#xff0c;提升办公协作效率&#xff0c;让各部门的信息有效互通起来&#xff0c;做好数据管理&#xff0c;已经成为众企业提升竞争力的方式方法。那么&#xff0c;如果想要提升办公效率&#xff0c;就需要了解开源大数据工具了。在数字化发展进程中&a…

《扬帆优配》西藏地震!美史上最严排放新规将出台,美股收涨

当地时间周四&#xff0c;美股遍及收高&#xff0c;科技股领涨。因耶稣受难日&#xff0c;美股4月7日&#xff08;周五&#xff09;休市&#xff0c;周四为美股本周最终一个买卖日&#xff0c;从本周状况来看&#xff0c;纳指与标普500指数均录得跌幅&#xff0c;别离跌1.1%和0…
最新文章