<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <style> *{ margin:0; padding:0; } .outer{ position: relative; margin:0 auto; width:800px; height:600px; border:20px solid green; overflow: hidden; } .outer .middle{ margin:80px auto; width:600px; height:400px; border:20px solid green; } .outer .middle .inner{ text-align: center; line-height:200px; font-size: 70px; margin:80px auto; width:400px; height:200px; border:20px solid green; } .outer .up{ width: 20px; height:200px; background: green; position: absolute; left: 390px; top:0; } .outer .down{ width: 20px; height:200px; background: green; position: absolute; left: 390px; bottom:0; } .outer .left{ width: 200px; height:20px; background: green; position: absolute; left:0; top:290px; } .outer .right{ width: 200px; height:20px; background: green; position: absolute; right:0; top:290px; } .outer .upleft{ width: 500px; height:20px; background: green; position: absolute; left:-235px; top:0; transform: rotate(45deg); } .outer .upright{ width: 500px; height:20px; background: green; position: absolute; right:-235px; top:10px; transform: rotate(136deg); } .outer .downleft{ width: 500px; height:20px; background: green; position: absolute; left:-235px; bottom:0; transform: rotate(135deg); } .outer .downright{ width: 500px; height:20px; background: green; position: absolute; right:-230px; bottom:0; transform: rotate(47deg); } </style></head><body><div class="outer"> <p class="up"></p> <p class="down"></p> <p class="left"></p> <p class="right"></p> <p class="upleft"></p> <p class="upright"></p> <p class="downleft"></p> <p class="downright"></p> <div class="middle"> <div class="inner"> 固始县|龙棋 </div> </div></div></body></html>
时间: 2024-10-21 02:42:35