没法设置不透明度
无法设置不透明度!
我用的IE10,用visual studio2012开发,设置不透明度无效,是什么原因呢?!
顺便问一下,我没有加文档规范<!doctype..>,因为加了之后javascript就无效了,可能我的这种书写格式不符规范,请问哪里有规范可以学习呢?
我用的IE10,用visual studio2012开发,设置不透明度无效,是什么原因呢?!
顺便问一下,我没有加文档规范<!doctype..>,因为加了之后javascript就无效了,可能我的这种书写格式不符规范,请问哪里有规范可以学习呢?
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test2.aspx.cs" Inherits="test2" %>
<html style="height:100%" xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>利用层实现伪模式窗口</title>
<script type="text/javascript">
function show() {
div1.style.display = "inline";
div2.style.display = "inline";
div1.style.width = body.clientWidth;
div1.style.height = body.clientHeight;
div2.style.top = body.clientHeight / 2 - div2.clientHeight / 2;
div2.style.left = body.clientWidth / 2 - div2.clientWidth / 2;
}
function closea() {
div1.style.display = "none";
div2.style.display = "none";
}
</script>
<style type="text/css">
.div1 {
background-color:#fff;
display:none;
position:absolute;
top:0;
left:0;
z-index:1;
filter:alpha(opacity =50);
border:4px inset red;
}
.div2 {
border:3px inset blue;
display:none;
position:absolute;
width:300px;
height:200px;
z-index:2;
background-color:#9999CC;/*背景色*/
}