在CSS中利用box-shadow属性实现多重边框
<!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title>42度空间-利用box-shadow属性实现多重边框</title> <style> .borders { box-shadow: 0 0 0 6px #fff, 0 0 0 12px #888; } .base { background: #222; padding: 4rem 2rem; color:#fff; font-weight: bold; text-align: center; margin: 2rem 1rem 0 1rem; } </style> </head> <body> <div class="base borders">利用box-shadow属性实现多重边框</div> </body> </html>