[英]Button not clicking inside Fixed position DIV?
由於頁腳位置固定,我遇到了一些問題。
頁腳欄css樣式如下所示:
.footerbar{
padding-bottom: 3px;
background-color: #05A3AD;
bottom: 100px;
height: 45px;
left: 0px;
position: fixed !important;
text-align: center;
width: 100%;
z-index: 101;
}
問題是,將按鈕置於固定div內時未單擊按鈕。 僅供參考,該按鈕是可單擊的,或者僅在具有上述樣式的IE上有效,而在任何其他瀏覽器上均無效。
即
<div class="footerbar">
<input type='button' id='somebtn'/>
</div>
somebtn不在固定div內單擊。 當我刪除固定位置並將底部從100px更改為0px時,該按鈕正在單擊並且可以正常工作。
在這一點上我很掙扎。 請就這個問題向我提出建議。 提前致謝。
工作正常,
div
,使用"/"
關閉div,然后 "."
(點)來自HTML代碼,即<div class=".footerbar">
CSS:
<div class="footerbar">
<input type='button' id='somebtn' />
</div>
在這個小提琴中工作得很好。 只需將類名從“ .footerbar”更改為“ footerbar”,然后正確關閉div!
<div class="footerbar">
<input type='button' id='somebtn' value="some button"/>
</div> //this needs to be corrected!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.