<style> .add-1{ width: 100%; height: 100%; background-color: rgb(0 0 0 / 21%); position: fixed; top: 0; bottom: 0; left: 0; right: 0; } </style> <script> function ade(){ document.getElementById('d4as').style.display="block"; } </script> </head> <body> <a href="javascript:ade()">点击我有遮罩层</a> <div class="add-1" id="d4as" style="display: none;"></div> </body>
转载联系作者并注明出处:https://www.focusonseo.cn/cassas/96.html