CSS之盒子模型

    xiaoxiao2026-06-11  0

    <!DOCTYPE html> <head> <meta charset="utf-8"> <!--适应--> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>盒子模型</title> <style type="text/css"> div{ width: 250px; height: 100px; border:1px solid #000000; color: black; font-weight: bold; text-align: center; margin-top: 10px; padding-top: 10px; margin-left: 3px; } div#d1{ position: relative; float: left; background-color: red; } div#d2{ position: relative; float: left; background-color: green; } div#d3{ position: relative; float: left; background-color: yellow; } div#d4{ position: relative; float: left; background-color: blue; } </style> </head> <body> <div id="d1"> #d1 </div> <div id="d2"> #d2 </div> <div id="d3"> #d3 </div> <div id="d4"> #d4 </div> </body> </html>
    转载请注明原文地址: https://ju.6miu.com/read-1310419.html
    最新回复(0)