css - jQuery Background-size Width AND Height values -
i'm trying set width , height background-size, jquery let me use 1 value no matter try, gets rid of height.
i setting width dynamically variable, need add static height. ideas on solution problem?
i have tried following code:
var itemresize = $(".slider-container ul li, .slider-container .blurlayer"); $(window).resize(function() { var windowwidth = $(window).width(); itemresize.css({ backgroundsize : windowwidth }); }).resize();
if provide 1 value, browser apply both width & height attributes.
here link experiment different values possible parameter: http://www.w3schools.com/cssref/playit.asp?filename=playcss_background-size
note : looks css property background-size
(even though backgroundsize
seems work too)
Comments
Post a Comment