对联广告代码实现
程序员文章站
2022-04-25 17:38:27
对联广告代码实现
...
对联广告代码实现
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>对联广告</title> <style> #main{ width: 1000px; height: 600px; margin: 0 auto; background: #ccc; } #box1{ width: 45px; height: 80px; background: red; position: absolute; top:120px; left:5px; } #box2{ width: 45px; height: 80px; background: red; position: absolute; top: 120px; right: 5px; } </style> </head> <body> <p id="main"></p> <p id="box1">box1</p> <p id="box2">box2</p> </body> </html>