前端项目实战:网易云静态页面——导航栏

news2024/9/19 16:41:01

文章目录

  • 一、实现目标
  • 二、顶部实现(背景为黑色部分)
    • 1. 内容布局
    • 2. 左边部分
      • 网易云logo
      • 左边的列表
      • 列表元素高亮
      • 指向每个列表元素的小红色三角
      • “下载客户端”后的hot标志
    • 3. 右边部分
      • 登陆
      • 创作者中心
      • 搜索
  • 三、底部实现(背景为红色部分)
  • 四、总代码
    • 1. html
    • 2. basic.css
    • 3. reset.css

一、实现目标

在这里插入图片描述
建立如下图所示文件夹及文件:
在这里插入图片描述

index_test.html是我们html的主要代码
basic.css是我们的细节样式
reset.css是重置样式(将某些个标签进行统一设置)
image用来存放我们要用的图片

image中的图片为:
在这里插入图片描述

整体框架:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>网易云导航栏</title>
    <link rel="stylesheet" href="./css_test/basic.css">
    <link rel="stylesheet" href="./css_test/reset.css">
</head>
<body>
    <div class="top">
        <div class="topbar">
            <div class="top-left"></div>
            <div class="top-right"></div>
        </div>
    </div>
    <div class="bottom"></div>
</body>
</html>

top用来实现导航栏顶部,topbar是用来实现top里的内容,bottom用来实现导航栏底部,top-left用来实现顶部左边部分内容,top-right用来实现顶部右边内容部分。

二、顶部实现(背景为黑色部分)

1. 内容布局

/* basic */
.top {
    height: 70px;
    background-color: #242424;
    /* 源代码中应该还有一个1px的边框,所以height应该是69px,这里直接用border-box把边框的长度算在height里 */
    box-sizing: border-box;
    border-bottom: 1px solid #000;
}

.topbar {
    width: 1100px;
    height: 69px;
    /* 设置行高,让topbar的子元素继承行高,进而让其子元素内容垂直居中 */
    line-height: 69px;
    margin: 0 auto;
    background-color: antiquewhite;
}

页面如下:
在这里插入图片描述
在top-left和top-right中分别加入文字left、right,然后设置topbar为浮动布局,让left和right在一行排列,并且根据浮动布局的特性让它们分别处于内容的左右两端。

/* basic */
.topbar {
    /* 浮动布局 */
    display: flex;
    /* 让left和right分别处于内容的左右端 */
    justify-content: space-between;
    width: 1100px;
    height: 69px;
    /* 设置行高,让topbar的子元素继承行高,进而让其子元素内容垂直居中 */
    line-height: 69px;
    margin: 0 auto;
    background-color: antiquewhite;
}

页面如下:
在这里插入图片描述
至此,内容布局完成,下面来做网易云logo。

2. 左边部分

网易云logo

更改html代码:

            <div class="top-left">
                <h1 class="logo">
                    <a href="#">网易云音乐</a>
                </h1>
            </div>

重置h1,a属性:

/* reset */
body,h1{
    padding: 0;
    margin: 0;
}

a{
    text-decoration: none;
    color: #000;
}

网页如下:
在这里插入图片描述

原网页中这个logo并没有文字,它是一张图片。所以添加如下代码使文字消失

/* basic */
.topbar .top-left .logo a{
    /* 将a变为块级元素,因为text-indent对行内元素无效 */
    display: block;
    text-indent: -9999px;
}

下面我们将logo标志作为logo元素的背景:

/* basic */
.topbar .top-left .logo{
    background-image: url(../images/topbar.png);
    /* 前面我们也看到了这个logo是那张图里的一部分,所以我们需要确定logo这部分图片的位置
    以及它的宽度来获取这部分图片而不参杂图片中的其他成分*/
    width: 157px;
}

同时删除topbar的背景色,页面如下:
在这里插入图片描述

左边的列表

更改html中的内容

                <h1 class="logo">
                    <a href="#">网易云音乐</a>
                </h1>
                <ul class="list">
                    <li><a href="#" class="item">发现音乐</a></li>
                    <li><a href="#" class="item">我的音乐</a></li>
                    <li><a href="#" class="item">关注</a></li>
                    <li><a href="#" class="item">商城</a></li>
                    <li><a href="#" class="item">音乐人</a></li>
                    <li><a href="#" class="item">下载客户端</a></li>
                </ul>

重置ul、li

/* reset */
body,h1,ul,li{
    padding: 0;
    margin: 0;
}

a{
    text-decoration: none;
    color: #000;
}

li{
    list-style: none;
}

继续添加样式:

/* basic */
.topbar .top-left{
    /* 浮动布局,让logo和列表排列在同一行上 */
    display: flex;
}

.topbar .top-left .list{
    /* 浮动布局,让list的每个li排列在同一行上 */
    display: flex;
}

.topbar .top-left .list .item{
    color: #ccc;
    /* 每个a的文本内容距离a的左右边框20px */ 
    padding: 0 20px;
}

此时页面如下:
在这里插入图片描述
此时发现logo与列表靠的太近了,修改一下:

.topbar .top-left .list{
    /* 浮动布局,让list的每个li排列在同一行上 */
    display: flex;
    padding-left: 20px;
}

页面如下:
在这里插入图片描述

列表元素高亮

可以看到在原网页中,当鼠标移动到“发现音乐”、“我的音乐”等上时背景颜色变暗,字体变白。且就算不移动到上面,也有一个元素是高亮的,不过那要用到js,这里就简单地做一个静态的。

                <ul class="list">
                    <li><a href="#" class="item active">发现音乐</a></li>
                    <li><a href="#" class="item">我的音乐</a></li>
                    <li><a href="#" class="item">关注</a></li>
                    <li><a href="#" class="item">商城</a></li>
                    <li><a href="#" class="item">音乐人</a></li>
                    <li><a href="#" class="item">下载客户端</a></li>
                </ul>
/* basic */
.topbar .top-left .list .item:hover,
.topbar .top-left .list .item.active{
    color: #fff;
    background-color: #000;
}

页面如下:在这里插入图片描述
可以看到每个列表元素的背景只有那么一点高度,这是因为我们我们设置文字颜色和背景颜色样式都是在a标签里的,而a标签是一个行内元素,不能设置宽高,所以背景的高度是由其内的文字撑起来的,这里我们将其转换成块级元素,继承父元素的高度即可。

/* basic */
.topbar .top-left .list .item{
    color: #ccc;
    /* 每个a的文本内容距离a的左右边框20px */ 
    padding: 0 20px;
    display: block;
}

页面如下:
在这里插入图片描述

指向每个列表元素的小红色三角

/* basic */
.topbar .top-left .list .item{
    color: #ccc;
    /* 每个a的文本内容距离a的左右边框20px */ 
    padding: 0 20px;
    display: block;
    /* 限制红色小三角的移动空间 */
    position: relative;
}

.topbar .top-left .list .item.active::after{
    content: "";
    position: absolute;
    background: url(../images/topbar.png) -226px 0;
    /* 引入图片后一定要设置宽高,不然图标无法显示出来 */
    width: 12px;
    height: 7px;
    /* 居中 */
    left: 0;
    right: 0;
    margin: auto;
    /* 让红色小三角从top的底部往下移一点点*/
}

页面如下:
在这里插入图片描述

“下载客户端”后的hot标志

                <ul class="list">
                    <li><a href="#" class="item active">发现音乐</a></li>
                    <li><a href="#" class="item">我的音乐</a></li>
                    <li><a href="#" class="item">关注</a></li>
                    <li><a href="#" class="item">商城</a></li>
                    <li><a href="#" class="item">音乐人</a></li>
                    <li><a href="#" class="item icon-hot">下载客户端</a></li>
                </ul>
.topbar .top-left .list .icon-hot::after{
    content: "";
    position: absolute;
    background: url(../images/topbar.png) -190px 0;
    width: 28px;
    height: 19px;
    /* 到这里上面已经出现了hot标志,下面进行偏移调整到合适的位置 */
    top: 21px;
    left: 100px;
    /* 到这里时,hot标志太靠近“下载客户端了”,调整一下间距 */
    margin-left: 10px;
}

页面如下:
在这里插入图片描述
到这里topbar的左边内容部分就完成了。

3. 右边部分

    <div class="top">
        <div class="topbar">
            <div class="top-left">
                <h1 class="logo">
                    <a href="#">网易云音乐</a>
                </h1>
                <ul class="list">
                    <li><a href="#" class="item active">发现音乐</a></li>
                    <li><a href="#" class="item">我的音乐</a></li>
                    <li><a href="#" class="item">关注</a></li>
                    <li><a href="#" class="item">商城</a></li>
                    <li><a href="#" class="item">音乐人</a></li>
                    <li><a href="#" class="item icon-hot">下载客户端</a></li>
                </ul>
            </div>
            <div class="top-right">
                <div class="search">搜索</div>
                <div class="author">创作者中心</div>
                <div class="login">登陆</div>
            </div>
        </div>
    </div>

此时页面如下:
在这里插入图片描述
下面添加css样式让三个div浮动到同一行排列

/* basic */
.topbar .top-right{
    display: flex;
    padding-right: 20px;
    font-size: 12px;
}

登陆

                <div class="login"><a href="#">登陆</a></div>

首先观察一眼原网页的“登陆”。

当我们鼠标进入“登陆”这个div时,颜色变亮,移动到“登陆”字体上时颜色又变浅且有下划线。

/* basic */
/* 登陆 */
.topbar .top-right .login a{
    color: #787878;
}

.topbar .top-right .login:hover a{
    color: #fff;
}

.topbar .top-right .login a:hover{
    color: #787878;
    text-decoration: underline;
}

页面如下:
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

创作者中心

                <div class="author"><a href="#">创作者中心</a></div>
/* basic */
/* 创作者中心 */
.topbar .top-right .author a{
    /* 为了设置宽高,将a设置为块级元素 */
    display: block;
    box-sizing: border-box;
    color: #ccc;
    width: 90px;
    height: 32px;
    /* 调整三个div的间距 */
    margin: 0 20px;
    /* 边框 */
    border: 1px solid #4F4F4F;
    border-radius: 20px;
    /* 使文字跑到边框的中心处*/
    line-height: 32px;
    text-align: center;
}

/* 鼠标移动到创作者中心处文字和边框高亮 */
.topbar .top-right .author:hover a{
    color: #fff;
    border-color: #fff;
}

页面如下:在这里插入图片描述
此时发现这个创作者中心跑到上面去了,这是因为把a标设置为了块级元素的原因。

此时我们在bar-right里添加一行代码即可:

.topbar .top-right{
    display: flex;
    padding-right: 20px;
    font-size: 12px;
    /* 让其子元素居中 */
    align-items: center;
}

页面如下:
在这里插入图片描述

搜索

                <div class="search"><input type="text"></div>
/* reset */
input{
    outline: none;  
    border: none;
}
/* basic */
/* 搜索 */
.topbar .top-right .search{
    /* 让input输入框浮动到search椭圆框的中间 */
    display: flex;
    align-items: center;
    /* 让input输入框到search框的最后 */
    justify-content: flex-end;
    /* 此时input还有一点点在search外面,调整一下使其在search内部 */
    padding-right: 10px;
    /* 加入搜索图标后,图标有一部分被挡住了,在下面设置一下input框的长度 */
    background: url(../images/topbar.png) 0 -99px;
    /* search椭圆框基本设置 */
    width: 158px;
    height: 32px;
    border-radius: 30px;
    background-color: #fff;
}

.topbar .top-right .search input{
    width: 118px;
}

页面如下:
在这里插入图片描述
突然发现左边列表文字有点大了,调整一下:

.topbar .top-left .list{
    /* 浮动布局,让list的每个li排列在同一行上 */
    display: flex;
    padding-left: 20px;
    font-size: 12px;
}

/* 调整以后发现hot标志又离得远一些了,再调整一下left */

.topbar .top-left .list .icon-hot::after{
    content: "";
    position: absolute;
    background: url(../images/topbar.png) -190px 0;
    width: 28px;
    height: 19px;
    /* 到这里上面已经出现了hot标志,下面进行偏移调整到合适的位置 */
    top: 21px;
    left: 80px;
    /* 到这里时,hot标志太靠近“下载客户端了”,调整一下间距 */
    margin-left: 10px;
}

页面如下:
在这里插入图片描述
再填补一下搜索框的文字

                <div class="search"><input type="text" placeholder="音乐/视频/电台/用户"></div>

同时修改文字的大小

.topbar .top-right .search input{
    width: 118px;
    font-size: 12px;
}

页面如下:
在这里插入图片描述

三、底部实现(背景为红色部分)

    <div class="bottom">
        <div class="botbar">
            <ul class="list">
                <li><a href="#" class="item">推荐</a></li>
                <li><a href="#" class="item">排行榜</a></li>
                <li><a href="#" class="item">歌单</a></li>
                <li><a href="#" class="item">主播电台</a></li>
                <li><a href="#" class="item">歌手</a></li>
                <li><a href="#" class="item">新碟上架</a></li>
            </ul>
        </div>
    </div>

页面如下:
在这里插入图片描述
添加样式(这里我发现顶部左边列表文字又调小了0.0,自己又去.topbar .bar-left .list里改成了14px)。

/* basic */
/* bottom */
.bottom{
    /* 背景设置 */
    height: 35px;
    background-color: #C20C0C;
    border-bottom: 1px solid #a40011;
    box-sizing: border-box;
    /* 让子元素继承行高,使list元素中的文字居中 */
    line-height: 35px;
}

.botbar{
	/* 与顶部列表对齐*/
    padding-left: 183px;
    box-sizing: border-box;
    width: 1100px;
    margin: 0 auto;
}


.botbar .list{
    /* 让list子元素浮动到一行排列 */
    display: flex;
}

.botbar .list .item span{
    /* span是行内元素,不能设置宽高,将其转换为块级元素 */
    display: block;
    /* 调整间距 */
    padding: 0 13px;
    margin: 7px 17px;
    height: 20px;
    /* 居中 */
    line-height: 20px;
    color: #fff;
    font-size: 12px;
}

页面如下:
在这里插入图片描述
再来实现高亮部分:

            <ul class="list">
                <li><a href="#" class="item active"><span>推荐</span></a></li>
                <li><a href="#" class="item"><span>排行榜</span></a></li>
                <li><a href="#" class="item"><span>歌单</span></a></li>
                <li><a href="#" class="item"><span>主播电台</span></a></li>
                <li><a href="#" class="item"><span>歌手</span></a></li>
                <li><a href="#" class="item"><span>新碟上架</span></a></li>
            </ul>

同时将list子元素的边框改为圆角

.botbar .list .item span{
    /* span是行内元素,不能设置宽高,将其转换为块级元素 */
    display: block;
    /* 调整间距 */
    padding: 0 13px;
    margin: 7px 17px;
    height: 20px;
    /* 居中 */
    line-height: 20px;
    color: #fff;
    font-size: 12px;
    border-radius: 21px;
}

.botbar .list .item:hover span,
.botbar .list .item.active span{
    background-color: #9B0909;
}

最终页面如下:
在这里插入图片描述
到这里网易云导航栏就制作完成啦!

有不足的地方还望大家多多指正

四、总代码

1. html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>网易云导航栏</title>
    <link rel="stylesheet" href="./css_test/basic.css">
    <link rel="stylesheet" href="./css_test/reset.css">
</head>
<body>
    <div class="top">
        <div class="topbar">
            <div class="top-left">
                <h1 class="logo">
                    <a href="#">网易云音乐</a>
                </h1>
                <ul class="list">
                    <li><a href="#" class="item active">发现音乐</a></li>
                    <li><a href="#" class="item">我的音乐</a></li>
                    <li><a href="#" class="item">关注</a></li>
                    <li><a href="#" class="item">商城</a></li>
                    <li><a href="#" class="item">音乐人</a></li>
                    <li><a href="#" class="item icon-hot">下载客户端</a></li>
                </ul>
            </div>
            <div class="top-right">
                <div class="search"><input type="text" placeholder="音乐/视频/电台/用户"></div>
                <div class="author"><a href="#">创作者中心</a></div>
                <div class="login"><a href="#">登陆</a></div>
            </div>
        </div>
    </div>
    <div class="bottom">
        <div class="botbar">
            <ul class="list">
                <li><a href="#" class="item active"><span>推荐</span></a></li>
                <li><a href="#" class="item"><span>排行榜</span></a></li>
                <li><a href="#" class="item"><span>歌单</span></a></li>
                <li><a href="#" class="item"><span>主播电台</span></a></li>
                <li><a href="#" class="item"><span>歌手</span></a></li>
                <li><a href="#" class="item"><span>新碟上架</span></a></li>
            </ul>
        </div>
    </div>
</body>
</html>

2. basic.css

/* basic */
.top {
    height: 70px;
    background-color: #242424;
    /* 源代码中应该还有一个1px的边框,所以height应该是69px,这里直接用border-box把边框的长度算在height里 */
    box-sizing: border-box;
    border-bottom: 1px solid #000;
}

.topbar {
    /* 浮动布局 */
    display: flex;
    /* 让left和right分别处于内容的左右端 */
    justify-content: space-between;
    width: 1100px;
    height: 69px;
    /* 设置行高,让topbar的子元素继承行高,进而让其子元素内容垂直居中 */
    line-height: 69px;
    margin: 0 auto;
}

.topbar .top-left .logo a{
    /* 将a变为块级元素,因为text-indent对行内元素无效 */
    display: block;
    text-indent: -9999px;
}

.topbar .top-left .logo{
    background-image: url(../images/topbar.png);
    width: 157px;
}

.topbar .top-left{
    /* 浮动布局,让logo和列表排列在同一行上 */
    display: flex;
}

.topbar .top-left .list{
    /* 浮动布局,让list的每个li排列在同一行上 */
    display: flex;
    padding-left: 20px;
    font-size: 14px;
}

.topbar .top-left .list .item{
    color: #ccc;
    /* 每个a的文本内容距离a的左右边框20px */ 
    padding: 0 20px;
    display: block;
    /* 限制红色小三角的移动空间 */
    position: relative;
}

.topbar .top-left .list .item:hover,
.topbar .top-left .list .item.active{
    color: #fff;
    background-color: #000;
}

.topbar .top-left .list .item.active::after{
    content: "";
    position: absolute;
    background: url(../images/topbar.png) -226px 0;
    /* 引入图片后一定要设置宽高,不然图标无法显示出来 */
    width: 12px;
    height: 7px;
    bottom: -2px;
    /* 居中 */
    left: 0;
    right: 0;
    margin: auto;
}

.topbar .top-left .list .icon-hot::after{
    content: "";
    position: absolute;
    background: url(../images/topbar.png) -190px 0;
    width: 28px;
    height: 19px;
    /* 到这里上面已经出现了hot标志,下面进行偏移调整到合适的位置 */
    top: 21px;
    left: 80px;
    /* 到这里时,hot标志太靠近“下载客户端了”,调整一下间距 */
    margin-left: 10px;
}

.topbar .top-right{
    display: flex;
    padding-right: 20px;
    font-size: 12px;
    /* 居中 */
    align-items: center;
}

/* 登陆 */
.topbar .top-right .login a{
    color: #787878;
}

.topbar .top-right .login:hover a{
    color: #fff;
}

.topbar .top-right .login a:hover{
    color: #787878;
    text-decoration: underline;
}

/* 创作者中心 */
.topbar .top-right .author a{
    /* 为了设置宽高,将a设置为块级元素 */
    display: block;
    box-sizing: border-box;
    color: #ccc;
    width: 90px;
    height: 32px;
    /* 调整三个div的间距 */
    margin: 0 20px;
    /* 边框 */
    border: 1px solid #4F4F4F;
    border-radius: 20px;
    /* 使文字跑到边框的中心处*/
    line-height: 32px;
    text-align: center;
}

/* 鼠标移动到创作者中心处文字和边框高亮 */
.topbar .top-right .author:hover a{
    color: #fff;
    border-color: #fff;
}

/* 搜索 */
.topbar .top-right .search{
    /* 让input输入框浮动到search椭圆框的中间 */
    display: flex;
    align-items: center;
    /* 让input输入框到search框的最后 */
    justify-content: flex-end;
    /* 此时input还有一点点在search外面,调整一下使其在search内部 */
    padding-right: 10px;
    /* 加入搜索图标后,图标有一部分被挡住了,在下面设置一下input框的长度 */
    background: url(../images/topbar.png) 0 -99px;
    /* search椭圆框基本设置 */
    width: 158px;
    height: 32px;
    border-radius: 30px;
    background-color: #fff;
}

.topbar .top-right .search input{
    width: 118px;
    font-size: 12px;
}

/* bottom */
.bottom{
    /* 背景设置 */
    height: 35px;
    background-color: #C20C0C;
    border-bottom: 1px solid #a40011;
    box-sizing: border-box;
    /* 让子元素继承行高,使list元素中的文字居中 */
    line-height: 35px;
}

.botbar{
	/* 与顶部列表对齐*/
    padding-left: 183px;
    box-sizing: border-box;
    width: 1100px;
    margin: 0 auto;
}


.botbar .list{
    /* 让list子元素浮动到一行排列 */
    display: flex;
}

.botbar .list .item span{
    /* span是行内元素,不能设置宽高,将其转换为块级元素 */
    display: block;
    /* 调整间距 */
    padding: 0 13px;
    margin: 7px 17px;
    height: 20px;
    /* 居中 */
    line-height: 20px;
    color: #fff;
    font-size: 12px;
    border-radius: 21px;
}

.botbar .list .item:hover span,
.botbar .list .item.active span{
    background-color: #9B0909;
}

3. reset.css

body,h1,ul,li{
    margin: 0;
    padding: 0;
}

a{
    text-decoration: none;
    color: #000;
}

ul,li{
    list-style: none;
}

input{
    outline: none;
    border: none;
}

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

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

相关文章

Echarts 项目演练(上)整体页面结构的构建

项目分辨率响应式创建 项目顶部信息条创建 页面主体创建 接项目搭建与初始化之后继续对项目进行部署工作 项目展示&#xff1a; 技术栈&#xff1a; 1. vue3.0vue-router4.0axios 2. flex 布局 3. LESS 4. rem 屏幕适配 5. echarts5.0 项目分辨率响应式创建 对插件…

arduino esp-01s开发环境配置(备忘)

很久没玩arduion了&#xff0c;前天一个网友提了一个问题要我帮忙&#xff0c;结果电脑重新做了系统&#xff0c;又要重新设置环境&#xff0c;结果忘记了&#xff0c;做个备忘&#xff0c;省得以后又要重新研究。 1、附加开发板管理器网址&#xff1a;http://arduino.esp8266…

L1-002 打印沙漏

L1-002 打印沙漏 分数 20 全屏浏览题目 切换布局 作者 陈越 单位 浙江大学 本题要求你写个程序把给定的符号打印成沙漏的形状。例如给定17个“*”&#xff0c;要求按下列格式打印 ************ *****所谓“沙漏形状”&#xff0c;是指每行输出奇数个符号&#xff1b;各行符号中…

机器学习——为什么逻辑斯特回归(logistic regression)是线性模型

问&#xff1a;逻辑斯蒂回归是一种典型的线性回归模型。 答&#xff1a;正确。逻辑斯蒂回归是一种典型的线性回归模型。它通过将线性回归模型的输出结果映射到[0,1]区间内&#xff0c;表示某个事物发生的概率&#xff0c;从而适用于二分类问题。具体地说&#xff0c;它使用sig…

Flink CDC 在易车的应用实践

摘要&#xff1a;本文整理自易车数据平台负责人王林红&#xff0c;在 Flink Forward Asia 2022 数据集成专场的分享。本篇内容主要分为四个部分&#xff1a; Flink 应用场景DTS 平台建设Flink CDC Hudi 应用实践未来规划 点击查看直播回放和演讲 PPT 一、Flink 应用场景 Flink…

Mybatis-Plus详解(新建maven项目、查询所有信息、打印SQL日志、实现CRUD(增删改查)、分页、条件查询且分页,前后端分离式开发)

Mybatis-Plus详解(新建maven项目、查询所有信息、打印SQL日志、实现CRUD(增删改查)、分页、条件查询且分页&#xff0c;前后端分离式开发) MyBatis-Plus(opens new window) (简称MP) 是一个MyBatis(opens new window)的增强工具&#xff0c;在MyBatis的基础上只做增强不做改变…

【牛客网】最难的问题与因子个数

目录 一、编程题 1.最难的问题 2.因子个数 一、编程题 1.最难的问题 链接&#xff1a;最难的问题__牛客网 (nowcoder.com) NowCoder生活在充满危险和阴谋的年代。为了生存&#xff0c;他首次发明了密码&#xff0c;用于军队的消息传递。假设你是军团中的一名军官&#xff…

Linux网络服务之yum仓库

目录 一、yum仓库简介二. ftp搭建yum源三. 搭建国内在线源四. 本地源和在线yum同时使用五. 通过缓存的方式保存所下载的软件包六 . 制作yum仓库 一、yum仓库简介 yum是一个基于RPM包&#xff08;是Red-Hat Package Manager红帽软件包管理器的缩写&#xff09;构建的软件更新机…

TortoiseSVN使用-权限配置

文章目录 3.5 权限配置3.5.1 单一版本库权限配置3.5.2 多版本库共享配置 3.5 权限配置 3.5.1 单一版本库权限配置 ①要设置授权访问就需要创建用户&#xff0c;并为用户设定权限 ②打开授权访问的配置 [1]打开 D:\DevRepository\Subversion\ERP\conf\svnserve.conf [2]将第 …

Day953.以假设驱动为指引 -遗留系统现代化实战

以假设驱动为指引 Hi&#xff0c;我是阿昌&#xff0c;今天学习记录的是关于以假设驱动为指引的内容。 很多人在做遗留系统现代化的时候呢&#xff0c;总觉得它是一个十分复杂的技术问题。 本来嘛&#xff0c;无论是代码的重构、架构的拆分&#xff0c;还是 DevOps 平台的搭…

2023年 团体程序设计天梯赛个人感悟及总结(附题解)——遗憾国三

今年也是第一次参加了天梯赛&#xff0c;在这里也写一下自己的一些赛前准备、比赛过程的一些问题&#xff0c;以及赛后的一些总结以及感悟叭&#xff01;首先赛前准备的话也不能说我准备的非常的充分吧&#xff0c;但是L2阶的题目我是真的刷的很猛很疯的呢&#xff0c;这样看来…

Python类的继承

一、类的继承 1、什么是继承 通过继承基类来得到基类的功能 所以我们把被继承的类称作父类或基类&#xff0c;继承者被称作子类 代码的重用 2、父&#xff08;基&#xff09;类与子类 子类拥有父类的所有属性和方法 父类不具备子类自有的属性和方法 3、继承的用法 定义…

vite+react+ts+mobx+antd+react-router-dom+sass+tailwindcss

写了Vue项目比较多了&#xff0c;最近想换一下react技术栈&#xff0c;锻炼自己的技术&#xff0c;废话不多说&#xff0c;开始创建项目吧&#xff0c;写这篇博客也只是记录我创建的过程&#xff0c;不通的版本难免有坑&#xff0c;欢迎一起分享讨论下! 1、npm create vite //…

【李老师云计算】Spark配置及Scala实现100个随机数找最大值

索引 前言1. Spark部署1.1 Spark下载1.2 解压Spark1.3 修改环境变量1.4 修改主机Spark配置文件1.4.1 slaves.template文件配置1.4.2 spark-env.sh.template文件配置 1.5 分享主机Spark到从机1.6 启动Spark集群(★重启后的操作)1.7 通过jps查看是否启动成功1.8 通过网页查看是否…

rk3568 适配摄像头 (mipi 单摄)

rk3568 适配摄像头 (mipi 单摄) MIPI CSI&#xff08;Mobile Industry Processor Interface Camera Serial Interface&#xff09;是一种用于移动设备的高速串行接口标准&#xff0c;用于连接图像传感器和图像处理器。MIPI CSI接口使用差分信号传输技术&#xff0c;将数据分为…

C/C++ 高精度(加减乘除)算法二进制优化

高级精度算法系列 第一章 简单实现 第二章 压位优化 第三章 二进制优化(本章) 文章目录 高级精度算法系列前言一、基本原理1、存储方式2、计算方式 二、关键实现1、整型转高精度数组&#xff08;二进制&#xff09;2、字符串转高精度数组&#xff08;二进制&#xff09;3、高精…

小程序进阶

1.1组件基础 自定义组件的结构与页面是一致的&#xff0c;即也包含有4个部分&#xff0c;分别为: .wxml 组件的布局结构 .js 组件的处理逻辑 .json 组件的配置文件 .wxstngs 组件的布局样式 1.1.1创建组件 通常将组件放到独立的目录components当中这个目录需要手动创建 …

Spring Boot的配置文件

目录 配置文件的作用 配置文件的格式 properties配置文件 格式 注释乱码问题 读取配置文件 properties的优缺点分析 YAML yml基本语法 yml配置的读取 注意事项:value的值加单双引号 配置对象 yml优点分析 properties和yml的区别 设置不同环境的配置文件 配置文件的…

Linux-搭建web服务器

综合练习&#xff1a;请给openlab搭建web网站 ​ 网站需求&#xff1a; ​ 1.基于域名[www.openlab.com](http://www.openlab.com)可以访问网站内容为 welcome to openlab!!! ​ 2.给该公司创建三个子界面分别显示学生信息&#xff0c;教学资料和缴费网站&#xff0c;基于[www.…

SpringCloud --- Ribbon负载均衡

一、负载均衡原理 SpringCloud底层其实是利用了一个名为Ribbon的组件&#xff0c;来实现负载均衡功能的。 那么我们发出的请求明明是http://userservice/user/1&#xff0c;怎么变成了http://localhost:8081的呢&#xff1f; 二、源码跟踪 为什么我们只输入了service名称就…