我有一个弹出模式的页面,但是当我单击关闭它时,页面会刷新,我不希望这种情况发生。
http://dev.ikov.org/store/index.php
如果你去商店页面,然后点击右侧的武器,你会看到一件物品。单击它,模式会弹出。但是,当您单击顶部的“浏览其他武器”时,它会强制页面刷新,我无法找到它为什么这样做,因为链接没有设置为去任何地方,只是为了关闭模式。
有人可以帮忙吗?
.modalDialog2 {
position: fixed!important;
font-family: Arial, Helvetica, sans-serif;
top: 0!important;
right: 0!important;
bottom: 0!important;
left: 0!important;
background: #000!important;
z-index: 999!important;
opacity:0!important;
-webkit-transition: opacity 400ms ease-in;
-moz-transition: opacity 400ms ease-in;
transition: opacity 400ms ease-in;
}
.modalDialog2:target {
opacity: 1!important;
display: block!important;
}
.modalDialog2 > div {
width: 672px;
position: fixed;
margin: 5% auto!important;
background: #fff;
z-index: 9999!important;
}
这是html的代码
<div id="ags" class="modalDialog2">
<div id="storeboxitem">
<div id="storeboxlight">
<a href="" title="Close" class="close" onclick="returnIndex()">Browse Other Weapons</a>
<div id="storeboxheader">
Armadyl GodSword
</div>
<div id="storeboxtext">
Purchase this very powerful godsword for maximum destruction<br/>
when killing other players in our minigames or PvP Areas. <br/>
The recorded max hit of this sword is 84 (840).<br/>
<img class="storeitemimg" src="storeimgs/playerags.png" width="100px" height="310x" />
<img class="storeitemimg" src="storeimgs/agstable.png" width="150px" height="310x" />
<input class="itemstextbox" type="text" name="username" value="Choose an amount" onfocus="blank(this)" onblur="unblank(this)"><button class="itemsbutton" type="button" onclick="">Buy This Item for 75 Tokens Each</button><br />
</div>
</div>
</div>
</div>