项目总览
1.新建index.html
2.引入css,js .链接http://v3.bootcss.com/getting-started/
3.导入当行条代码,代码链接http://v3.bootcss.com/components/#navbar
4.搜索brand,将这条语句
<a class="navbar-brand" href="#">Brand</a>
修改为
<a class="navbar-brand" href="#">
<img class="logo" src="{{url_for('static',filename = 'Logo/cat.png')}}" alt="">
</a>
5.然后在static文件夹
新建css文件夹
,新建文件index.css
,调整一下图片大小
(之前css目录用大小,导致css文件没有效果,不知怎么回事)
.logo{
width: 30px;
height: 25px;
}
在index.html中导入index.css
<link rel="stylesheet" href="{{url_for('static',filename = 'css/index.css')}}">
然后更改一下中文,效果如下