how to make text transparent without changing to an image using css

Tags: css,css3

Problem :

I have a navigation bar that tells the user which page is selected by a change in text colour and a black background. I want to make only the text inside the current page nav transparent.

Example here: - scroll down to grey area to view

I have researched using CSS3 but no luck, I want to keep load times down to the very minimum hence not wanting to use an image.

Solution :

This isn't possible with plain CSS/CSS3.

Even if you did make the text transparent, it wouldn't appear grey when scrolling over the grey area. If the text was transparent, it would show the black background behind it.

You could however use some javascript to detect what the background is, and change the color of the font depending on this.

    CSS Howto..

    How to add media='screen' in css using cakePHP?

    How to switch between specific CSS files using jQuery?

    How to automatically validate after typing the input without using any frameworks, just simple code for my registration form?

    How is physical inch related to pixels in css given so many different resolutions?

    How to set transition from JavaScript while still inheriting style from CSS [closed]

    How to fill parent element background color with CSS?

    How do I set the width and height of a textarea using CSS?

    how to reference background image urls in css through config entrys

    How to dynicamlly center the center of a div based on screen size

    How to set a div over a div using css?

    How can I position some divs inside an unordered list so they line up with the root element of the list?

    How to make text blink on website? [duplicate]

    How to get bean property on css file?

    CSS: How would I select a specific Text and hide it

    how to style a horizontal submenu with nested

      How to change text in the same area when hover over images with CSS?

      How to use particular CSS styles based on screen size / device

      How to stop a timeOut animation that contains multiple timeOut animations within

      multiple CSS classes, how they work and WHY do it this way? [duplicate]

      CSS Transition - how to make a text coming from the top side?

      How to change margin according to other elements?

      How to keep the Parent menu hovered while the mouse in child menu in a Dropdown Menu

      How to create and manage large CSS projects?

      How to use custom css file for layout of a module in Yii2

      How to output CSS files to single directory from several input directories?

      How to float div up?

      How to set stylesheet programmatically in an ASP.NET MVC 2 project?

      How can I use jQuery to add a fade in hover effect to my nav items?

      How to apply a CSS transition only to the transform property

      How to add modal window parameters for this code?