Gestaltung der Frontend-Seite
1. Entwerfen Sie Ihr Div auf der Frontend-Seite
Erstellen Sie eine neue index.php-Datei
<!doctype html> <html> <head> <meta charset="utf-8"> <title>圖形計(jì)算器</title> </head> <body> <div id="contains"> <h1>簡(jiǎn)易圖形計(jì)算器</h1> <a href=''>矩形</a> | <a href=''>三角形</a> | <a href=''>圓形</a> | <a href=''>球體</a> <hr> <?php echo "請(qǐng)選擇一個(gè)圖形"; } ?> </div> </body> </html>
Der Betriebseffekt ist wie in der Abbildung dargestellt :
2, ?ndern Sie den Div-Stil
<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>
Die Laufergebnisse sind wie folgt: