While working on my homepage created with HTML/CSS/Javascript, I have text positioned at the top left corner of the screen. The challenge arises from the fact that I am using different backgrounds sourced from Reddit, and a script randomly selects one during page load. Due to the varied colors of these backgrounds, the readability of the text is compromised. To address this issue, I came up with the idea of selectively blurring the background around the text to enhance its legibility.
I envision the blur effect to encompass only the area surrounding the text, possibly following its outline for a more seamless appearance. However, my initial attempts involved placing the text in a box, which proved cumbersome due to the relative positioning of elements on the page. This made it difficult to achieve the desired level of blurring without affecting other parts of the background unnecessarily.
If you have suggestions on how to effectively enhance text readability by selectively blurring the background solely around the text, or any other methods considering the dynamic nature of the changing backgrounds, please feel free to share your thoughts!