随笔分类 - 代码复习
摘要:将之前新闻网站django项目的首页、分类页、详情页的数据渲染改成了用vue.js+restful api进行前端渲染 api.py: index.html: category.html: detail.html: urls.py: view.py:
阅读全文
摘要:models.py: forms.py: views.py: 模板css profile.css: 模板html: urls.py: url(r'^profile/', profile, name='profile')
阅读全文
摘要:models.py: views.py: forms.py: 模板css register.css: 模板文件 register.html: urls.py: url(r'^register/', register, name='register')
阅读全文
摘要:models.py: views.py: 模板css login.css: 模板文件 login.html: urls.py: url(r'^login/', login, name='login')
阅读全文
摘要:models.py 相关模型: 自定义评论表单 forms.py: view.py: 模板css detail.css: 模板html detail.html: urls.py: url(r'^detail/(?P<article_id>\d+)/$', detail, name='detail')
阅读全文
摘要:models.py 相关模型: view.py: 模板css category.css: 模板category.html: <!DOCTYPE html>{% load staticfiles %}<html> <head> <meta charset="utf-8"> <title>分类页</ti
阅读全文
摘要:models.py(与首页相关的部分): views.py: 模板 index.html: <!DOCTYPE html>{% load staticfiles %}<html> <head> <meta charset="utf-8"> <title>首页</title> <link rel="s
阅读全文
摘要:豆瓣 豆瓣 读书 电影 音乐 同城 小组 ...
阅读全文
摘要:外联css profile.css: html文件:
阅读全文
摘要:外联css register.css: html文件:
阅读全文
摘要:外联css login.css: html文件: 新样式:two fields
阅读全文
摘要:外联css detail.css: html文件:
阅读全文
摘要:外联css category.css: html页面:
阅读全文
摘要:外联CSS index.css: html: 新学到的样式:ui horizontal segments 水平排列的segment集
阅读全文
摘要:新学到的样式:card:卡片容器 object-fit:cover 覆盖,要求图片大于容器,且宽和高有一个要和容器一致。这样图片可能比原来小,这里使用防止图片失真。 ui pagination menu 分页菜单样式 title header 小标题
阅读全文
摘要:新学到的样式:card-view 卡片视图
阅读全文
摘要:1.position:relative; 如果对一个元素进行相对定位,首先它将出现在它所在的位置上。然后通过设置垂直或水平位置,让这个元素"相对于"它的原始起点进行移动。(再一点,相对定位时,无论是否进行移动,元素仍然占据原来的空间。因此,移动元素会导致它覆盖其他框) 相对定位:relative 没
阅读全文
摘要:.block-1 { box-sizing: border-box; width: 64px; height: 64px; background:url('images/grass.png'); background-size: contain; position: absolute; left:6
阅读全文
摘要:<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> body{ background-color:#e4e4e4; } .total{ background-colo
阅读全文
摘要:新学到的样式: box-sizing:border-box 自动计算,固定总长宽 float:left 向左浮动
阅读全文

浙公网安备 33010602011771号