前端學習(2851):簡單秒殺系統學習之相對定位
阿新 • • 發佈:2021-01-02
<html> <head > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>CSS相對定位</title> <style type="text/css"> div { background-color: Red; width: 30px; height: 30px; } #box_relative { position: relative; left: 10px; top: 10px; background-color: gray;z-index:-1; } </style> </head> <body> <div></div><div id="box_relative"></div><div style="z-index:30"></div> </body> </html>
執行結果