1.2 flask資料夾templates, static的用途

腫魔沒人留言?快點下去搶頭香啊!

  1. templates:放html檔案,如:
    <!DOCTYPE html>
    <html>
    	<head>
    		<title>Page Title</title>
    	</head>
    	<body>
    
    		<h1>This is a Heading</h1>
    		<p>This is a paragraph.</p>
    
    	</body>
    </html>

    詳見w3schools HTML5 Tutorial

  2. static:放css檔案,如:
    body {
        background-color: lightblue;
    }
    
    h1 {
        color: white;
        text-align: center;
    }
    
    p {
        font-family: verdana;
        font-size: 20px;
    }

    詳見w3schools CSS Tutorial

至於如何在flask使用,下次介紹

0 0 vote
Article Rating
訂閱(Subscribe)
來自於(Notify of)
0 Comments
Inline Feedbacks
View all comments