在CSS中利用额外的DIV嵌套实现多重边框
<!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title>三十客-在CSS中利用额外的DIV嵌套实现多重边框</title> <style> .outer { border: solid 6px #888; background: #fff; } .inner { background: #222; margin: 6px; } .base { color:#fff; font-weight: bold; text-align: center; padding: 4rem 2rem; } .m-1 { margin: 1rem; } </style> </head> <body> <div class="outer m-1"> <div class="inner base">利用额外的DIV嵌套实现双重边框</div> </div> </body> </html>