2019/5/23补充 ↓
css实现按钮固定在底部
按钮固定在底部
css:
<style>
.bottom{position:fixed; bottom:0;}
</style>
html:
<div>
<div class="bottom">
<input type="submit" value="底部按钮" class=""/>
</div>
</div>
一个小需求,页面过长,业务希望将按钮悬浮于页面上,不要一下拉就盖掉操作按钮。
代码如下:
div position参数设置为fixed 其相对于浏览器为绝对位置,通过设置right和top将div固定在右上角。
table position参数设置为absolute,其相对于第一层div绝对定位,通过设置right和top将table固定在div容器的右上角
<div id="dg" style="z-index: 9999; position: fixed ! important; right: 0px; top: 0px;">
<table width=""100% style="position: absolute; width:260px; righ