wrote a simple web application with tab switching. When the mobile chrome64 uses click tab switch to call the fadein () method to display the corresponding section, there will be a small black block in the upper left corner of the screen, sometimes the PC side will appear, sometimes it will not appear
edit: can basically be reproduced on mobile phone
online demo
http://js.jirengu.com/qovoz/e.
$tabs = $("footer>div")
$panels = $("section")
$tabs.click(function () {
var index = $(this).index()
$panels.hide().eq(index).fadeIn()
$(this).addClass("active").siblings().removeClass("active")
})
<html>
<head>
<script src="//code.jquery.com/jquery-2.1.1.min.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<main>
<section>Container1</section>
<section>Container2</section>
</main>
<footer>
<div class="tab">Tab1</div>
<div class="tab">Tab2</div>
</footer>
</body>
</html>
*{
padding:0;
margin:0;
box-sizing:border-box;
}
html,body,main{
height:100%;
width:100%;
}
body{
position:relative;
}
main>section{
height:calc(100% - 50px);
display:none;
overflow:scroll;
}
main>section:first-child{
display:block;
}
footer{
display:flex;
position:absolute;
bottom:0;
height:50px;
width:100%;
}
footer>.tab{
flex:1;
border:1px solid;
text-align:center;
}
footer>.tab.active{
flex:1;
border:1px solid;
text-align:center;
background-color:green;
}