• 0
  • 0

打开弹窗显示内容样式

2020-06-06 90 0 admin 所属分类:HTML

效果

  

CSS样式

.deal {
	display: none;
	position: fixed;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	z-index: 9999;
	background-color: #fff;
}

.deal .content {
	position: absolute;
	width: 90%;
	top: 0;
	height: 85%;
	left: 5%;
	overflow: auto;
}

.deal .btn {
	position: absolute;
	width: 90%;
	bottom: 10px;
	left: 5%;
}

.deal .btn a {
	font-size: 18px;
	padding: 10px;
	border: 1px solid #fff;
	background-color: #FF9800;
	border-radius: 15px;
	color: #fff;
	cursor: pointer;
	display: inline-block;
	text-align: center;
	height: 30px;
	line-height: 30px;
	width: 95%;
	color: #fff;
}

HTML代码

<div class="deal">
    <div class="content">{$content}</div>
    <div class="btn">	<a onclick="hideDeal()">关闭协议内容</a>	
    </div>
</div>

JS代码

function showDeal() {
    $('.deal').show();
}

function hideDeal() {
    $('.deal').hide();
}



返回顶部