I'm sure this shouldn't be as difficult as it seems... I can't use a JQuery scrollpane because I need it to act as a standard form textarea when it gets submitted.. needs to work in IE7+, Safari & firefox at least... any ideas?
Tried this...
textarea {
scrollbar-face-col开发者_C百科or: #ff8c00;
scrollbar-track-color: #fff8dc;
scrollbar-arrow-color: #ffffff;
scrollbar-highlight-color: #fff8dc;
scrollbar-shadow-color: #d2691e;
scrollbar-3dlight-color: #ffebcd;
scrollbar-darkshadow-color: #8b0000;
}
... but only works in IE ?
Any ideas??
Use -webkit-scrollbar
pseudo-elements for scroll bar:
textarea::-webkit-scrollbar {
width: 1em;
}
textarea::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
}
textarea::-webkit-scrollbar-thumb {
background-color: darkgrey;
outline: 1px solid slategrey;
}
You can find more detail here: https://css-tricks.com/almanac/properties/s/scrollbar/
I have never done this so im not completely sure on this, but I remember one my colleagues was doing this for a site we were developing and he had the same minor issue.
I think you are along the right track, although the scrollbar properties need to be in the body css like so:
body {
scrollbar-face-color: #ff8c00;
scrollbar-track-color: #fff8dc;
scrollbar-arrow-color: #ffffff;
scrollbar-highlight-color: #fff8dc;
scrollbar-shadow-color: #d2691e;
scrollbar-3dlight-color: #ffebcd;
scrollbar-darkshadow-color: #8b0000;
}
Maybe you could try giving the desired text area and id property and apply that in the css, so:
textarea.(insertrelevantID) {
.....
}
精彩评论