The mobile side of the page some of the content is to be fixed at the bottom, generally use fixed, when the page input to the focus of the time,
The bottom of the content will be on the top
If the button is on top, sometimes it doesn't affect the page effect, but when the bottom is a few ads or attention, this time the effect is not.
Solution,:
. mdfmessagebtn{
width:100%;
height:50px;
Background-color: #ffb000;
Color: #fff;
Position:absolute;
bottom:0;
font-size:16px;
}
Html:
<div class= "Usercontainer" style= "position:relative; ">
<button class= "MDFMESSAGEBTN" > Immediate payment </button>
</div>
ls|
Loadbtn (". Usercontainer", ". Mdfmessagebtn");
/* Button Positioning */
function Loadbtn (boot,loat) {
var height=$ (window). Height ();
$ (boot). CSS ("min-height", height);
var uheight=$ (boot). Height ();
if (uheight<=height) {
}else{
$ (loat). css ({"position": "Relative"})
}
};
Absolute positioning of the button, to its parent relative positioning, get screen height, so that its parent's minimum height is the height of the screen,
About the bottom positioning problem on the mobile side