HTML? Overflow-x:hidden? ? ?? ???? ??? ????? ??? ??? ??? ??????
P粉633309801
2023-08-17 12:48:44
<p>? ?? ???? ?? ????? <em>???? ???? ??</em>? <code>html {overflow-x:hidden;?? ?? ???? ????. </p>
<pre class="brush:php;toolbar:false;"><script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <!-- jQuery ?? -->
<button onclick="topFunction()" class="buton" id="myBtn" title="? ?? ????"><i class="fa-solid fa-angle-up"></i> ;
<????>
let mybutton = document.getElementById("myBtn");
window.onscroll = function() {scrollFunction()};
?? ???Function() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
mybutton.style.display = "??";
} ? ?? {
mybutton.style.display = "??";
}
}
?? topFunction() {
document.body.scrollTop = 0; // ????
document.documentElement.scrollTop = 0; // Chrome, Firefox, IE ? Opera? ?????.
}
</????>
</??>
CSS
HTML,
? {
??: 100%;
??? ??: ????;
??: ??;
????-x: ??;
}
? {
???:#060606;
?? ??: '????', ????;
??: #ffffff;
??: 0;
??: 0;
}
.Buton {
????-x: ???!???;
}
#myBtn {
?????: ??;
??: ??;
??: 20px;
???: 30px;
Z-??: 99;
???: ??;
??: ??;
???: ???;
??: ??;
??: ???;
??: 15px;
??? ??: 10px;
?? ??: 18px;
}
#myBtn:?? {
???: #333;
}</pre>
<p>???? ?????. ????? ? ?????. ???? ?????. ????? ? ?????. ???? ?????. ????? ? ?????. ???? ?????. ????? ? ?????. ???? ?????. ?????, ?? ??? ? ?????, ??? ?????, ?? ??? ? ?????, ??? ?????, ?? ??? ? ?????, ??? ?????, ?? ??? ? ?????, ??? ?????, ?? ??? ? ????? ??? ??</p>
<p>html?? Overflow-x? ???? ??? ??? ????? ?? ??? ??? ???? ??? ????</p>
?? ???? overflow-x
樣式,并通過(guò) id
??? ???? ???.
CSS:
???
?? +0
P粉633309801