1, design your div on the front-end page
Create a new index.php file
<!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>
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:
Next Section