Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 948601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:16:09+00:00 2026-05-15T23:16:09+00:00

I have an element with content inside it. The element – with its content

  • 0

I have an element with content inside it.

The element – with its content – should be fully opaque on the left , fully transparent on the right. Evenly graded from right to left.

As the content and background it is merging into are not fixed, there is no way to make an image in advance.

I am aware that gradients can be used as backgrounds (-moz-linear-gradient), but that doesn’t help me – here, I need the contents of the element themselves to fade out.

I have been able to do this in IE (Alpha Mask) and Webkit (image-mask), but have been completely stumped in FF.

I don’t mind using SVG if there is a way there.

Please help?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T23:16:10+00:00Added an answer on May 15, 2026 at 11:16 pm

    This page explains how to achieve this for FF 3.5+

    https://developer.mozilla.org/en/applying_svg_effects_to_html_content

    You probably want something like this in a file called mask.svg:

    <?xml version="1.0" standalone="no"?>
    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
      "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
    <svg xmlns="http://www.w3.org/2000/svg"
         version="1.1"
         baseProfile="full">
         <mask id="m1" maskUnits="objectBoundingBox" maskContentUnits="objectBoundingBox">
            <linearGradient id="g" gradientUnits="objectBoundingBox" x2="1">
              <stop stop-color="white" offset="0"/>
              <stop stop-color="white" stop-opacity="0" offset="1"/>
            </linearGradient>
            <rect x="0" y="0" width="1" height="1" fill="url(#g)"/>
          </mask>
    </svg>
    

    Then include the following in your CSS:

    mask: url(/path/to/mask.svg#m1);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 511k
  • Answers 511k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Use CONVERT function if it is SQL SERVER Select CONVERT(VARCHAR(10),Birthdate,110)… May 16, 2026 at 5:17 pm
  • Editorial Team
    Editorial Team added an answer The sorting algorithm used by OrderBy, OrderByDescending, ThenBy, and ThenByDescending… May 16, 2026 at 5:17 pm
  • Editorial Team
    Editorial Team added an answer By default, Spring beans are basically singletons. Spring will create… May 16, 2026 at 5:17 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

When you set an html element to have display: none , the content inside
I have a transparent table with width:100% which contains some html content. I use
I load content via Ajax and then I'll have element like $('.my_content_class') and I
I have a page with iframe. Content inside iframe does window.parent.resizeTo calls (or something
Here's the idea: I have a div element, #content_wrapper, which encompasses three floated divs,
How do you get the rendered height of an element? Let's say you have
I have a container div element that has overflow:hidden on it. Unfortunately this property
What a mouthful. Basically I have a parent <div> and inside that an <iframe>
I have some boiler-plate script required for a Telerik RadGrid on one of my
I have several javascripts at the head of my document, as well as at

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.