彈出我有一個div作爲自定義彈出加載隱藏的div作爲使用<a>標籤
<div class="deletePopup">
<header class="popupHeader">Confirm Delete!!!
<a href="#" class="cancelButton" data-toggle="tooltip" title="Cancel" onclick="closePopup();"><span class="glyphicon glyphicon-remove"></span></a>
</header>
<section class="popupContent">
<p class="deleteMessage">Are you Sure You want to delete this Timecard?</p>
</section>
<footer class="popupFooter">
<span>
<button id="okDelete" type="submit" class="btn btn-info btn-sm deletebuttons" data-toggle="tooltip" title="Delete" onclick="okDelete();">
Delete
</button>
</span>
</footer>
</div>
這是默認隱藏。 我想要做的是顯示DIV當有人點擊此鏈接
<a href="#">Click Me<a>
上是有可能通過DIV ID /類的HREF鏈接,並加載DIV不使用JQuery/JavaScript的。
如果你需要的話,這裏也是css的一部分。
/**的CSS刪除彈出**/
.deletePopup {
display: none;
position: fixed;
z-index: 10;
padding-top: 100px;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgb(0,0,0);
background-color: rgba(0,0,0,0.4);
}
.popupHeader{
margin: auto;
background-color: #37d4ff;
color: white;
width:300px;
padding-top: 5px;
padding-bottom: 5px;
border-radius: 10px 10px 0px 0px;
text-align: center;
font-weight: bolder;
}
.popupContent {
background-color: #f8f8f8;
margin: auto;
padding: 20px;
width: 300px;
height: 80px;
font-weight: bold;
font-family: cursive;
}
.popupFooter{
margin: auto;
background-color: #f8f8f8;
width: 300px;
height: 50px;
border-radius: 0px 0px 10px 10px;
text-align: center;
}
.deletebuttons {
color: white;
}
.cancelButton{
position: fixed;
top:88px;
margin-left: 79px;
background-color: #37d4ff;
float: right;
height: 25px;
width:25px;
margin-right: 10px;
border:2px solid #37d4ff;
border-radius: 13px;
z-index: 10;
color: white;
}
.cancelButton:hover {
color: white;
}
.cancelButton span{
margin-top: 2px;
}
.deleteMessage{
text-align: center;
}
不,你不能沒有JQuery的/ JavaScript的做到這一點。 –
你不能。添加一個類的最低限度需要一點點javascript –