使用css设计弹出窗口

css文件

	.glass{
	 	background-color: #666 ;
        width: 100%;
        height: 100%;
        left: 0;
        top: 0; /*FF IE7*/
        filter: alpha(opacity=50) ; /*IE*/
        opacity: 0.5; /*FF*/
        z-index: 1;
        position: fixed !important; /*FF IE7*/
        position: absolute; /*IE6*/
        display : block;
	}
	.showbox{
		background: white;
		position: absolute;
		display: block;
		z-index: 2;
		width: 600px;
		height: 400px;
		top: 25%;
		left: 30%;
	}
	.hidden{
		display: none;
	}
	#showbox #boxmenu{
		background:RGB(52,101,164);
		height:35px;
		font-size:larger;
		color:white;
	}
	#showbox #boxmenu #title{
		padding-left: 10px;
		padding-top: 10px;
		float:left;
	}
	#showbox #boxmenu #close{
		float:right;
		padding-right: 20px;
		margin-top:2px;
		cursor:pointer;
		background: url(../images/pop-up-close.png) no-repeat;
		height: 30px;
		width: 25px;
	}
	#showbox #boxmenu #close:active{
		background:url(../images/closeRed.png) no-repeat;
	}

    #showbox #boxhead{
    	clear:both;
    	float: left;
    	padding-top: 10px;
    	padding-left: 10px;
    }
    #showbox #boxbody{
    	clear: both;
    	padding-top: 10px;
    }
    #showbox #boxbody div{
    	float: left;
    	padding-left:10px;
    	width: 40%;
    }
    #showbox #boxbody div input{
    	cursor:pointer;
    }
    #showbox #boxsubmit{
    	clear: both;
    	padding-top: 20px;
    	padding-left: 20px;
    }
    #showbox #boxsubmit input{
    	height:35px;
    	width:80px;
    	background-color: RGB(52,101,164);
    	color:white;
    	font-size:larger;
    	cursor:pointer;
    }
		
	

想让弹出窗口隐藏的时候把对应部分的class设置为hidden,想让弹出式使用class为showbox,想设置透明效果时设置为glass

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

WitsMakeMen

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值