---
title: "Discussion on \"Avoid Using \"background-attachment: fixed\" with background-image:(url(\"./assests/bg.png\")) without fallback or will get bug in mobile first Design...\" | Hashnode"
description: "Discussion on \"Avoid Using \"background-attachment: fixed\" with background-image:(url(\"./assests/bg.png\")) without fallback or will get bug in mobile first Design...\". . hero {\nbackground-image: url('banner.jpg');\nbackground-size: cover;\nbackground-position: center;\nbackground-attachment: fixed;\nheight: 100vh;\n}\n\nDoesn't always work on mobile browsers (especially iOS Safari)\n\nSome devices disable it by default for ..."
url: "https://hashnode.com/posts/avoid-using-background-attachment-fixed-with-background-imageurlassestsbgpng-without-fallback-or-will-get-bug-in-mobile-first-design/67fcf48c321c0f5687289580"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Avoid Using "background-attachment: fixed" with background-image:(url("./assests/bg.png")) without fallback or will get bug in mobile first Design...](https://devwithkunal.hashnode.dev/avoid-using-background-attachment-fixed-with-background-imageurlassestsbgpng-without-fallback-or-will-get-bug-in-mobile-first-design?utm_source=hashnode&utm_medium=feed)

. hero { background-image: url('banner.jpg'); background-size: cover; background-position: center; background-attachment: fixed; height: 100vh; } Doesn't always work on mobile browsers (especially iOS Safari) Some devices disable it by default for ...

Apr 14, 2025 · 1 min read · devwithkunal.hashnode.dev  
Read the article

-   [#html5](https://hashnode.com/tag/html5)
-   [#css](https://hashnode.com/tag/css)
-   [#background-image](https://hashnode.com/tag/background-image)

## Written by

[Kunal Mathuri](https://hashnode.com/@kunal-mathuri)

@kunal-mathuri

  
[View profile](https://hashnode.com/@kunal-mathuri)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
