Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Die Funktionalität dieser Website ist durch Wartungsarbeiten eingeschränkt, die Ihr Erlebnis verbessern sollen. Wenn ein Artikel Ihr Problem nicht löst und Sie eine Frage stellen möchten, können Sie unsere Gemeinschaft über @FirefoxSupport auf Twitter, /r/firefox oder Reddit fragen.

Hilfe durchsuchen

Vorsicht vor Support-Betrug: Wir fordern Sie niemals auf, eine Telefonnummer anzurufen, eine SMS an eine Telefonnummer zu senden oder persönliche Daten preiszugeben. Bitte melden Sie verdächtige Aktivitäten über die Funktion „Missbrauch melden“.

Weitere Informationen

How do I temporarily hide the scroll bars ?

  • 5 Antworten
  • 7 haben dieses Problem
  • 1 Aufruf
  • Letzte Antwort von whoo

more options

How do I temporarily hide the scroll bars ?

How do I temporarily hide the scroll bars ?

Ausgewählte Lösung

This code will hide both scroll bars:

void(document.body.style.setProperty("overflow","hidden",""));
Diese Antwort im Kontext lesen 👍 1

Alle Antworten (5)

more options

Open the Firefox > Web Developer > Scratchpad (Shift+F4) and paste this code in it and use Execute > Run (Ctrl+R) or create a bookmarklet with this code as the location.


javascript:void(document.body.style.setProperty('overflow-y','hidden','important'));void(document.body.style.setProperty('overflow-x','hidden','important'));

Change hidden to auto to get the scroll bar(s) back.

more options

I assume that your post in [/questions/906990#answer-291125] ended up in the wrong thread and should have appeared here.

The only thing that changes if you run the code in the Scratchpad is the disappearance and reappearance of the scroll bar in the current tab. You do not see anything in the Scratchpad. So you need to switch back to the browser window. You can test it with this code, that should make both scroll bars appear:

void(document.body.style.setProperty("overflow","scroll",""));

[/questions/906990#answer-291125]:

In Scratchpad I ran both: .
void(document.body.style.setProperty("overflow-x","hidden",""));
.
and
.
void(document.body.style.setProperty("overflow-x","hidden",""));

In the 2nd one I got:

17:48:57.826 |x unexpected end of XML source
 @ Scratchpad:1'''
.
.
For the 1st one I got no activity, only a blinking cursor.
.
any other ideas ?
.
Good luck and merry Christmas,  Bill
.</blockquote>
more options

To: cor-el

From: whoo

Re: Scroll Bars


OK, I think that I've finally got it! One last question - In:

void(document.body.style.setProperty("overflow","scroll",""));

what do I change to HIDE BOTH the scroll bars ?

Geändert am von whoo

more options

Ausgewählte Lösung

This code will hide both scroll bars:

void(document.body.style.setProperty("overflow","hidden",""));
more options

cor-el

Thank you very much for you help and persistence.

When offering your much appreciated help and advice I urge you to consider the level of expertize that your audience may have. I have found that slow, step by step instructions are the most effective.

Thanks again, whoo (Bill)