0

My web cannot load with my url image, but when I change other url, its work

This capture when I use my url image

.colored {
        background-color: #0000;
        mask: url("https://get-married.site/uploads/ornamen/24.png") no-repeat center / contain;
        -webkit-mask: url("https://get-married.site/uploads/ornamen/24.png") no-repeat center / contain;
    }

But its work when I use this url

This when I use other URL

https://i.ibb.co/FhZb3Xs/CJcLK.png
fhdyt
  • 7
  • 4

1 Answers1

0

You actually do get an error, my friend. When looking into the console, you will get the following error message:

index.html:1 Access to image at 'https://get-married.site/uploads/ornamen/24.png' from origin 'https://cdpn.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

This means that you are not allowed to use this image in your code because it has some protection. As long as you are not the owner of the page where the image is located, you will not be able to use the image.

JKD
  • 1,279
  • 1
  • 6
  • 26
  • Sorry, i am not notice that, any suggest for fix it ? – fhdyt Feb 02 '21 at 15:00
  • You can't really fix it. You are not the owner of the image. Therefore you are also not allowed to download the image to your server and use it locally. Im afraid you will have to find another image. – JKD Feb 02 '21 at 15:02