iwato Posted October 30, 2017 Share Posted October 30, 2017 BACKGROUND: I like gradients because they are both colorfully attractive and easy on the eyes. They are also suggestive of binary thought and all that lies between the two polar extremes of 1 and 0. For these reasons I often employ gradients as the background colors of my <div> elements. Background gradients suffer from an important weakness, however: monochromic text is easy to read at one end of the gradient, but difficult to read at the other. QUESTION: Does anyone know of a way to cause text to change color as it is displayed across the width and height of the element that contains it? Roddy Link to comment Share on other sites More sharing options...
Ingolme Posted October 30, 2017 Share Posted October 30, 2017 CSS can't put gradients on text. Perhaps you can make your gradients more subtle so that the text isn't hard to read on it. 1 Link to comment Share on other sites More sharing options...
dsonesuk Posted October 30, 2017 Share Posted October 30, 2017 Usually when i have this problem i use text shadow of contrasting colour to the text colour itself. 1 Link to comment Share on other sites More sharing options...
iwato Posted October 30, 2017 Author Share Posted October 30, 2017 Ingolme: If I were to make my gradients more subtle, I would lose the underlying -- subconscious, if you will -- binary effect. dsonesuk: This is an idea that I have yet to try. It does seem reasonable though. Since I submitted this ticket, I have found code on the net that provides the effect for which I am looking. Unfortunately, it places a <span> element around each in every word. Surely, this very costly in download and display time. Maybe, if i could achieve a similar effect, but at much lower cost by styling individual <p>, rather than word elements. Roddy Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now