Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Color Overlay Img

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #31648
    justinede
    Member

    Hey Everyone!

    Anyone know of a method, preferably css, that would allow me to color overlay an image?

    Think of it as if you were in Photoshop and brought up the Blending Options panel and applied a Color Overlay.

    Thanks!

    #59970
    Sirlon
    Member

    Well, you can do somthing like:


    Overlay Img

    .overlay-img { position:relative; display:inline-block;}
    .overlay-img:before {
    content: ' ';
    display: block;
    position:absolute;
    width:100%;
    height:100%;
    background: rgba(240, 210, 0, 0.3); /* rgb Color with alpha, you can also give it a bg color and set opacity: down. */
    pointer-events: none;
    }

    But i would recommend taking a look at & pixel manipulation. ;)

    #59990
    soap
    Participant

    If I had to achieve this effect, I’d first make a 1px x 1px 50% opacity (or whatever you want) colored png.

    Then I’d do something like this:







    div.holder {
    position:relative
    width:150px; height:150px;
    }
    img.overlayimg {
    display:block;
    position:relative;
    z-index:100;
    }
    div.overlay_orange {
    background:url(../images/overlay_orange.png) repeat;
    position:absolute;
    top:0; left:0;
    width:100%; height:100%;
    z-index:110;
    }
    #168757
    justinhimt
    Participant

    Here is some CSS Overlay technique…CSS Color Overlay

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.