flask: 静态文件的访问
一,创建目录

二,代码
css
.item {background:#0000ff;padding-top:15px;margin-top:13px;margin-left:15px;width:672px;
position:absolute;left:-12px;border-top:1px solid silver;border-left:0px;border-right:0px;
border-bottom:0px;line-height:24px;}
页面
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/item.css') }}" type="text/css">
</head>
<body>
<form method=POST enctype=multipart/form-data action="{{ url_for('photo.photo_uploaded') }}">
<input type=file name=photo>
<input type=submit>
</form>
<img src="{{ url_for('static', filename='images/egt.jpg') }}" style="width:200px;" />
<div class="item" style="width:200px;height:200px;"></div>
</body>
</html>
三,测试效果:
浙公网安备 33010602011771号