Search code examples
htmlcsssafaribackground-imagemobile-safari

CSS background-image don't work on Safari browser


My images don't work on Safari browser (iPhone 6,7,8...), it works on Chrome, Opera, Firefox. Please help me. Here is my live project http://plocastinamestajleske.com/

CSS code

.logo {
  background-image: url("/assets/img/logo.png");
  background-image: url("/assets/img/logo.webp");
  background-size: 100%;
  background-repeat: no-repeat;
  width: 200px;
  height: 100%;
}


Solution

  • I've had a similar problem and converting my image from png to gif helped. There are a few known bugs with Safari and background images.

    This link to a similar problem might have some other solutions if mine doesn't work.