CSS弹出背景半透明窗口_html/css
来源:动视网
责编:小采
时间:2020-11-27 15:57:49
CSS弹出背景半透明窗口_html/css
CSS弹出背景半透明窗口_html/css_WEB-ITnose: language=javascript
导读CSS弹出背景半透明窗口_html/css_WEB-ITnose: language=javascript
- " language="javascript"> 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");// 恢复浏览器滚屏
- }
- script>
-
-
-
- 终于搞定这个效果了,IE和FF,OP均可以~
- 先说原理:两个层,一个高度和宽度都是100%,另一个就是你要弹出的窗口的具体内容,半透明在IE中是用filter: Alpha(opacity=60);在非IE中用opacity:0.60;
-
-
-
-
CSS弹出背景半透明窗口_html/css
CSS弹出背景半透明窗口_html/css_WEB-ITnose: language=javascript