hello
I use Modal on the page that I want when the page is running it will show Modal so I wrote the below codes but it didn't work
I want when the page is running it shows the modal
<title></title>
<link href="Css/modal.css" rel="stylesheet" />
<style>
.imgsaveM {
width: 80px;
height: 50px;
}
.lbldelmes {
font-size: 50px;
color: white;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
</style>
</head>
<body>
<div id="openModal7" class="modalDialog">
<div>
<div class="deleteMes4">
<asp:Label ID="Label15e" runat="server" CssClass="lbldelmes">Well come</asp:Label>
</div>
</div>
</div>
<script src="scripts/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$('#openModal7').modal('show');
setTimeout(function () {
$('#openModal7').modal('hide');
}, 5000);
});
</script>
</body>
</html>
CSS:
.modalDialog {
position: fixed;
font-family: Arial, Helvetica, sans-serif;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: rgba(0,0,0,0.8);
z-index: 99999;
opacity:0;
-webkit-transition: opacity 100ms ease-in;
-moz-transition: opacity 100ms ease-in;
transition: opacity 100ms ease-in;
pointer-events: none;
}
.modalDialog:target {
opacity:1;
pointer-events: auto;
}
.modalDialog > div {
width:500px;
position: relative;
margin: 10% auto;
padding: 5px 0 13px 0;
border-radius: 10px;
background: #fff;
background: -moz-linear-gradient(#fff, #999);
background: -webkit-linear-gradient(#fff, #999);
background: -o-linear-gradient(#fff, #999);
height:100px;
}
.modalDialog > div {
float: right;
width: 583px;
height: 258px;
background: url(../image/admin/load.png) no-repeat;
position: relative;
margin: 200px 400px 0 0;
padding: 5px 0 13px 0;
}
.close {
background: #606061;
color: #FFFFFF;
line-height: 25px;
position: absolute;
right: 12px;
text-align: center;
top: 10px;
width: 24px;
text-decoration: none;
font-weight: bold;
-webkit-border-radius: 12px;
-moz-border-radius: 12px;
border-radius: 12px;
-moz-box-shadow: 1px 1px 3px #000;
-webkit-box-shadow: 1px 1px 3px #000;
box-shadow: 1px 1px 3px #000;
}
.close:hover { background: #00d9ff; }
.close1 {
float:right;
text-align: center;
width: 35px;
text-decoration:none;
margin-right:10px;
height:20px;
}
.modalDialog2 {
position: fixed;
font-family: Arial, Helvetica, sans-serif;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: rgba(0,0,0,0.8);
z-index: 99999;
opacity:0;
-webkit-transition: opacity 100ms ease-in;
-moz-transition: opacity 100ms ease-in;
transition: opacity 100ms ease-in;
pointer-events: none;
}
.modalDialog2:target {
opacity:1;
pointer-events: auto;
}
.modalDialog2 > div {
float: right;
width: 583px;
height: 258px;
background: url(../image/admin/loadA.png) no-repeat;
position: relative;
margin: 200px 400px 0 0;
padding: 5px 0 13px 0;
}
.modalDialog3 {
position: fixed;
font-family: Arial, Helvetica, sans-serif;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: rgba(0,0,0,0.8);
z-index: 99999;
opacity:0;
-webkit-transition: opacity 100ms ease-in;
-moz-transition: opacity 100ms ease-in;
transition: opacity 100ms ease-in;
pointer-events: none;
}
.modalDialog3:target {
opacity:1;
pointer-events: auto;
}
.modalDialog3 > div {
float: right;
width: 203px;
height: 200px;
background: url(../image/admin/firstMessage.png) no-repeat;
position: relative;
margin: 0px 0px 0 0;
padding: 5px 0 13px 0;
}
thanks in advanced