【CSS实现Loading遮罩】点击按钮,弹出一个DIV层窗口
生活随笔
收集整理的這篇文章主要介紹了
【CSS实现Loading遮罩】点击按钮,弹出一个DIV层窗口
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
加載中 gif 圖片:
頁面效果:
源碼
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>點擊文字彈出一個DIV層窗口代碼</title> <style> .black_overlay{ display: none; position: absolute; top: 0%; left: 0%; width: 100%; height: 100%; background-color: black; z-index:1001; -moz-opacity: 0.6; opacity:.60; filter: alpha(opacity=66); } .white_content { display: none; position: absolute; top: 25%; left: 25%; width: 55%; height: 55%; padding: 20px; border: 10px solid orange; background-color: white; text-align: center;z-index:1002; overflow: auto; } </style> </head> <body> <a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">請點這里</a></p> <!-- 加載中遮罩 --><div id="light" class="white_content" ><font size="5">正在努力轉換中 ~ 此過程大約需要20秒,請耐心等待<br></font><img src='loading.gif' width='400px' height='300px'/></div> <div id="fade" class="black_overlay"></div> </body> </html>總結
以上是生活随笔為你收集整理的【CSS实现Loading遮罩】点击按钮,弹出一个DIV层窗口的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 2019秋季PAT甲级考试心得
- 下一篇: 主流Java学习路线