• Tips
  • Widgets
  • Blogger
  • Windows
  • Tools

Automatically Change Background Color on Refresh in Blogger

Follow Qurkx on Facebook
Never miss an update – join 15K+ followers
Follow

blogger-logoHave you ever wondered to provide your visitors with a fresh look everytime they refresh your blog or maybe visit one or another article, well now with easy CSS and JavaScript's hacks you can apply few easy tweaks that can make your work a lot easier. Well yes we are talking about changing our blog's background color everytime a person refreshes your blog, so he would be greeted with a new background color.

So I do not have any demo for this effect but I am using this effect at the time of posting this article so if you are reading this article pretty late you might not be able to see this effect, but it's a simple CSS overriding effect so it simply adds a new color HEX code everytime a person refresh's your blog and color's are randomly selected. So if you wish to add this effect to your blogger blog just check below  steps.

  1. Open Blogger > Template > Edit HTML.
  2. Now press Ctrl + F and search for </head> tag & paste below code above it.

    <script>$(function(){function e(){return"rgb("+Math.round(Math.random()*255)+", "+Math.round(Math.random()*255)+", "+Math.round(Math.random()*255)+")"}$("body").each(function(t){$(this).css("background",e())})})</script>

  3. Now just Save Template and refresh your blog to see this effect.

So now everytime you refresh your blog you will see background color changing randomly, so you open any post and you will see different color. So that's it hope you guys liked this article, if you find any problem do comment.

Trending Now

  • Run Java Apps on Android Using JBed Emulator – Complete Guide
    Run Java Apps on Android Using JBed Emulator – Complete Guide
  • Blogger Conditional Tags b:if and b:else for More Blog Customizations
    Blogger Conditional Tags b:if and b:else for More Blog Customizations
  • 10 Essential Free Blogging Tools & Services Every Blogger Needs in 2026
    10 Essential Free Blogging Tools & Services Every Blogger Needs in 2026
  • Watch Indian Television Channels using VLC Media Player
    Watch Indian Television Channels using VLC Media Player
  • Top 9 Websites for Watching Movies Streaming Online for Free
    Top 9 Websites for Watching Movies Streaming Online for Free
  • How to View Large Size Profile Picture of Locked Profiles on Facebook
    How to View Large Size Profile Picture of Locked Profiles on Facebook
  • Naughty 18+ NON-VEG Jokes for WhatsApp and Facebook
    Naughty 18+ NON-VEG Jokes for WhatsApp and Facebook
About UsContactPrivacy PolicyTerms of ServiceDisclaimer
© 2011 - Qurkx // The Digital Collective