フロントエンドページのデザイン
1、フロントエンド ページで div を設(shè)計します
新しいindex.php ファイルを作成します
<!doctype html> <html> <head> <meta charset="utf-8"> <title>圖形計算器</title> </head> <body> <div id="contains"> <h1>簡易圖形計算器</h1> <a href=''>矩形</a> | <a href=''>三角形</a> | <a href=''>圓形</a> | <a href=''>球體</a> <hr> <?php echo "請選擇一個圖形"; } ?> </div> </body> </html>
実行中のエフェクトは次の図に示すとおりです。
##2、div スタイルを変更します
<style> * { margin: 0px; padding: 0px; } #contains { width: 500px; margin: 20px auto; background: skyblue; text-align: center; } h1 { width: 500px; height: 60px; } a { font-size: 20px; text-decoration: none; } </style>
実行結(jié)果は次のとおりです: