Layout:
Header
Body
Footer
$ (#). Hide ()
Add:
Cursor:pointer; For a tag, the mouse becomes smaller hand
A-label underline disappears: Text-decoration:none
Z-index: value, layer distribution
Rounded Corners: border-radius:50%
. Header.menu a:hover{}
Change color in Mouse point
Example:
<! DOCTYPE html>
<meta charset= "UTF-8" >
<title></title>
<style>
. header {
background-color:red;
}
. header. Menu a{
padding:15px;
}
. header. Menu a:hover{//header menu has spaces in the middle, hover changes all a-label background color to Green
Background-color:green; //
}
</style>
<body>
<div class= "Header" >
<div class= "Container" >
<div class= "Menu" >
<a href= "#" > Menu one </a>
<a href= "#" > Menu </a>
<a href= "#" > Menu </a>
</div>
</div>
</div>
</body>
Examples of small bubbles:
<! DOCTYPE html>
<meta charset= "UTF-8" >
<title></title>
<style>
. arrow{
Display:inline-block;
border-top:10px solid;
border-right:10px solid;
border-bottom:10px solid;
border-left:10px solid;
Border-top-color:transparent;
Border-right-color:black;
Border-bottom-color:transparent;
Border-left-color:transparent;
}
</style>
<body>
<div class= "Arrow" > </div>
</body>
Web Request Flow:
Request->socket-> Framework
Html:views Templates
Database: Models
Processing request function: Controllers Viems
Abbreviation: MVC
Django
To create a Django project:
Django-admin Startproject SiteName
Create an App
Python manage.py Startapp AppName
Synchronizing databases
Python manage.py syncdb
Python manage.py makemigrations
Python manage.py Migrate
{%include%} Import HTML
{%block%} inherits HTML, inherits only one
Motherboard: {% block title%}{% Endblock%}
Sub-board: {% extends "base.html"%}//Inheritance
{% block title%} {% Endblock%}
Overall layout with master, single piece when using include
How to refer to the master version:
Create the master directory inside the templates, create the m1.html master inside the master, and then templates
Create the sub-html,son1.html below, then define the function below, then define the URL below urls.py
Django-related knowledge