Web Development Articles - Page 1021 of 1049

How to set background image in CSS using jQuery?

Amit D
Updated on 11-Dec-2019 08:20:50

979 Views

To set the background image using jQuery, use the jQuery css() method.ExampleUse the background-image property to add background image to the web page.Live Demo $(document).ready(function(){    $(".bg").css("background-image", "url('/css/images/css.jpg')"); });

How to load external website into an