一個簡單的彈出層例子,有需要參考的可以參考一下
<div class="NavBoxBg1" id="NavBoxBg1" ></div>
<style>
.NavBoxBg1{ display:none;opacity:1; background: url(../Images/productBg.png) repeat;width: 100%;height: 100%;position: fixed;z-index:8998;left: 0;top: 0;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;}
</style>
<script>$("#NavBoxBg1").show();</script>
如果是用原生js
<script>document.getElementById(“NavBoxBg1").style.display="block";(或者等于空)</script>