MN-maryam
جمعه 27 فروردین 1395, 13:48 عصر
کد زیر رو برای پنجره ی پاپ آپ نوشتم ولی پنجره باز نمیشه. مشکل چیه؟
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<script type="text/javascript">
$(document).ready(function () {
$('.light').css({"opacity":"0.5"});
$('.click').click(function () {
$('.box').fadein();
$('.popup').slidedown();
});
$('.light,.close').click(function () {
$('.box').fadeout();
$('.popup').slideup();
});
</script>
<style type="text/css">
body {text-align:center;}
span{ font : 20px tahoma; cursor:pointer;}
.box,.light{width:100% ; height:100% ;position:fixed;top:0;bottom:0;left:0;right:0; z-index=999;}
<%--بک گراند لایت--%>
.light{ background-color:#fff;}
<%--پنجره--%>
.popup { width:450px; height:450px; background-color:#fff; position:relative; z-index:1000; margin:auto; top:75px; border-radius:10px; border-shadow: 0 0 10px 0 #000; overflow:hidden;}
.popup .close { float:left; background-color:red; padding:10px; color:#fff; font :15px tahoma;cursor:pointer;}
.box, .popup{ display:none;}
</style>
<span class="click">
click
</span>
<div class=box>
<div class=light></div>
<div class=popup>
hello
<div class=close>
×
</div>
</div>
</div>
</asp:Content>
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<script type="text/javascript">
$(document).ready(function () {
$('.light').css({"opacity":"0.5"});
$('.click').click(function () {
$('.box').fadein();
$('.popup').slidedown();
});
$('.light,.close').click(function () {
$('.box').fadeout();
$('.popup').slideup();
});
</script>
<style type="text/css">
body {text-align:center;}
span{ font : 20px tahoma; cursor:pointer;}
.box,.light{width:100% ; height:100% ;position:fixed;top:0;bottom:0;left:0;right:0; z-index=999;}
<%--بک گراند لایت--%>
.light{ background-color:#fff;}
<%--پنجره--%>
.popup { width:450px; height:450px; background-color:#fff; position:relative; z-index:1000; margin:auto; top:75px; border-radius:10px; border-shadow: 0 0 10px 0 #000; overflow:hidden;}
.popup .close { float:left; background-color:red; padding:10px; color:#fff; font :15px tahoma;cursor:pointer;}
.box, .popup{ display:none;}
</style>
<span class="click">
click
</span>
<div class=box>
<div class=light></div>
<div class=popup>
hello
<div class=close>
×
</div>
</div>
</div>
</asp:Content>