• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

scrollleiste farbig machen

Status
Für weitere Antworten geschlossen.

cain

Neues Mitglied
ich wollte bei meiner website, die scrollleiste farbig machen mit folgendem code:

Code:
body {
    scrollbar-face-color:#ff0;
    scrollbar-base-color:#ff1;
    scrollbar-track-color:#ccc;
}

damit wird der scrollbalken am bildschirmrand (rechts) nicht farbig, dafür bei alle scrollbalken, die in der "homepage" drinnen sind. (die halt im ganz großen casten drinnen sind.) ... das dümmste :-( ... der scrollbalken wird nur vom IE farbig angezeigt.

könnt ihr mir helfen???

mfg leo :)
 
Werbung:
"... das dümmste :sad: ... der scrollbalken wird nur vom IE farbig angezeigt"

Ansichtssache oder besser zum Glück :eek:).
Da wirst wohl nichts finden.

die CSS Eigenschaft "scrollbar (Microsoft-Eigenschaften für Scroll-Leisten)"
 
Werbung:
Wenn wir schon beim Auflisten sind: Auch im Konqueror gehts leider.

Und es ist schlicht nicht benutzerfreundlich, wenn die Elemente des Browsers verändert werden. Genauso wie das Zweckentfremden der Statuszeile oder das Ändern von Buttons oder Eingabefeldern.
 
Vielleicht sowas:

============================================================
Script: Change Scrollbar Color Dynamically

Functions: Changes the color of the scrollbars in a page
dynamically, via a simple JavaScript function;
shows how to attach the scrollbar color change
function to links and to mouseOver and other
events.

Browsers: IE5.5 and Later (ignored by other browsers)

Author: etLux
============================================================

Step 1. Optional Style

This is optional. If you leave it out, the browser will show
the standard default color for the scrollbars (usually that
is #C0C0C0). If you include this style, then you can set
the initial scrollbar color to whatever you wish -- just
change the #C0C0C0 to whatever color is required.

The <style> ... </style> goes in the head of your
page:

<style>
body{
scrollbar-base-color: #C0C0C0
}
</style>

============================================================

Step 2. The Script

Put the following <script ... </script> in the head of
your page. No modifications are needed:

<script>


function changeScrollbarColor(C){
if (document.all){
document.body.style.scrollbarBaseColor = C
}
}

</script>

============================================================

Step 3. Calling the Script

To set the color, just change the #FFFFFF format colors in
the parentheses. (Careful to get the syntax with the single
and double quotes just right!)

Usually, you'll attach the function to a link. Here's the
actual code from our page, up above:

<a href="javascript:changeScrollbarColor('#FF0000')">Change to Red</a><br>
<a href="javascript:changeScrollbarColor('#FF8000')">Change to Orange</a><br>
<a href="javascript:changeScrollbarColor('#FFFF00')">Change to Yellow</a><br>
<a href="javascript:changeScrollbarColor('#00FF00')">Change to Green</a><br>
<a href="javascript:changeScrollbarColor('#4444FF')">Change to Blue</a><br>

You can also, of course, call the code from any mouse event;
for instance, try sliding your mouse over this, also from
our page above, for an interesting effect:

<a href="#" onMouseOver="changeScrollbarColor('#FF0000')">Change to Red</a><br>
<a href="#" onMouseOver="changeScrollbarColor('#FF8000')">Change to Orange</a><br>
<a href="#" onMouseOver="changeScrollbarColor('#FFFF00')">Change to Yellow</a><br>
<a href="#" onMouseOver="changeScrollbarColor('#00FF00')">Change to Green</a><br>
<a href="#" onMouseOver="changeScrollbarColor('#4444FF')">Change to Blue</a><br>

Obviously, you can carry this further, using onMouseOut,
onClick, or other events.

============================================================
 
Werbung:
hmm... ist natürlich ansichtssache, ob man es gut findet, wenn man die scrollleiste von browsern verändern kann oder nicht. ich finde es eigentlich manchmal ziemlich gut, aber manchmal auch nicht.

vielen dank für die ganzen infos von euch, leute

mfg leo :D
 
Ja, gefallen muss das nicht jedem. Aber es birgt halt auch Gefahren. Ältere Menschen erkennen die Scrollbar vielleicht nicht mehr als solche, insbesondere wenn sie nicht am rechten Fensterrand steht, sondern irgendwo inmitten des Designs. Noch schlimmer sind natürlich die Lösungen, die eigenes Scrolling simulieren, wo man dann über Buttons scrollen kann. Aber solche Lösungen sind zumeist auch noch langsam und verhindern das Scrollen mit dem Mausrad.

Also mehr eine Frage der Nutzerfreunedlichkeit als der reinen Geschmackssache, weil Scrollbalken ein essenzielles Element bei der Bedienung des WWW sind.

Grüße,
-Efchen
 
Werbung:
Status
Für weitere Antworten geschlossen.
Zurück
Oben