繁体   English   中英

按钮未在固定位置DIV内单击?

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM