CSS弹出背景半透明窗口_html/css_WEB-ITnose
-
<script></script>" language="javascript">
- <script> </script>
- $(function(){
- var query = location.search;
- var equal_index = query.lastIndexOf("=");
- var result_index = query.indexOf("result");
- var submit_index = query.indexOf("submit");
- if(result_index != -1){
- if(query.substring(equal_index + 1) == 'success') {
- $("#msg").text('保存成功');
- pupopen();
- }
- }
- if(submit_index != -1){
- if(query.substring(equal_index + 1) == 'success') {
- $("#msg").text('上报成功');
- pupopen();
- }
- }
- });
- function pupopen(){
- $("#bg").css("display", "block");
- $("#popbox").css("display", "block");
- $(window).scroll(function(){ $(window).scrollTop(0); });// 禁止浏览器滚屏
- }
-
- function pupclose(){
- $("#bg").css("display", "none");
- $("#popbox").css("display", "none");
- $(window).unbind("scroll");// 恢复浏览器滚屏
- }
-
-
- body{margin:0px;}
- #bg{width:100%;height:100%;top:0px;left:0px;position:absolute;filter: Alpha(opacity=50);opacity:0.5; background:#000000; display:none;}
- #popbox{position:absolute;width:300px; height:200px; left:50%; top:50%; margin:-200px 0 0 -200px; display:none; background:#FFFFFF;}
-
-
-
-
- 终于搞定这个效果了,IE和FF,OP均可以~
- 先说原理:两个层,一个高度和宽度都是100%,另一个就是你要弹出的窗口的具体内容,半透明在IE中是用filter: Alpha(opacity=60);在非IE中用opacity:0.60;
-
-
-
" />
-
-
" width="70" style="max-width:90%" onclick="pupclose()" style="cursor:pointer"/>
-
-
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
作者最新文章
-
2024-10-22 09:46:29
-
2024-10-13 13:53:41
-
2024-10-12 12:15:51
-
2024-10-11 22:47:31
-
2024-10-11 19:36:51
-
2024-10-11 15:50:41
-
2024-10-11 15:07:41
-
2024-10-11 14:21:21
-
2024-10-11 12:59:11
-
2024-10-11 12:17:31