Front-end page design
1, design your div on the front-end page
Create a new index.php file
<!doctype html> <html> <head> <meta charset="utf-8"> <title>圖形計(jì)算器</title> </head> <body> <div id="contains"> <h1>簡易圖形計(jì)算器</h1> <a href=''>矩形</a> | <a href=''>三角形</a> | <a href=''>圓形</a> | <a href=''>球體</a> <hr> <?php echo "請選擇一個(gè)圖形"; } ?> </div> </body> </html>
The running effect is as shown in the figure:
2, modify the div style
<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>
The running results are as follows: