javascript - Is it possible to change text color based on background color using css? -



javascript - Is it possible to change text color based on background color using css? -

is possible alter text color based on background color using css?

like in image

as text crosses on 1 div (white-space:nowrap) possible alter text color using css or jquery/javascript?

thanks

here solution (thinking through different way):

use div overflow: hidden; navy 'bar' shows rating scale. write out 2 sets of text:

inside div bar (overflow: hidden;), white (on top) in underlying div container, black. (container)

the result overlap of 2 colored text divs:

________________________________ | 1 | 2 | |_(dark bluish w white)_|__________|

here jsfiddle

it works great because 'cut through' letters if bar @ width. check out, think looking for.

javascript jquery css

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -