HTML&CSS基础

    xiaoxiao2025-08-02  16

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> *{ margin: 0; padding: 0; } .header{ width:1000px; height: 100px; background-color: aquamarine; margin: 0 auto; } .center{ width: 1000px; height: 150px; background-color:hotpink; margin:10px auto; } .flooter{ width: 1000px; height: 100px; background-color: royalblue; margin: 0 auto; } .left{ width: 200px; height: 100%; background: khaki; float: left; } .cener{ width: 580px; height: 100%; background: teal; float: left; margin: 0 10px; } .right{ width: 200px; height: 100%; background:lawngreen; float: left; } </style> </head> <body> <div class="header"></div> <div class="center"> <div class="left"></div> <div class="cener"></div> <div class="right"></div> </div> <div class="flooter"></div> </body> </html>

    效果:

    最新回复(0)