Is there a foreground equivalent to background-image in css?

后端 未结 4 1292
一生所求
一生所求 2020-12-13 17:02

I want to add some shine to an element on webpage. I would prefer if I don\'t have to add additional html to the page. I want the image to appear in front of the element rat

4条回答
  •  醉话见心
    2020-12-13 17:38

    You can use this css

    #yourImage
    {
    z-index: 1; 
    }
    

    NOTE

    Set the z-index to index greater the the z-index of the element over which you are putting the image.

    If you have not specified any z-index then 1 would do the work.

    You can also set z-index to -1,in that case the image would always be at background!

提交回复
热议问题