css - How To change box shadow range in jQuery -
css - How To change box shadow range in jQuery -
how alter box shadow width code
$('#range1').change(function () { $('.divwidth').css({ boxshadowx: this.value + 'px' }); $('.divwidth').css({ 'boxshadowy': this.value + 'px' }); $('.divwidth').css({ 'boxshadowblur': this.value + 'px' }); });
this.value + 'px' = avalue of html range
jquery before 1.8
$('.divwidth').css({ 'color' : 'black', 'background' : 'white', 'border-radius' : '15px', 'box-shadow' : '0px 0px 0px #444', '-moz-box-shadow' : '0px 0px 0px #444', '-webkit-box-shadow' : '0px 0px 0px #444', });
after 1.8 can utilize
$('.divwidth').css({ boxshadow: '1px 3px 6px #444' })
and is:
$('.divwidth').css({ boxshadow: '1px ' + this.value + 'px ' + '6px #444' })
and boxshadow property boxshadow : horizontal(x) vertical(y) blur shadow
jquery css function range onchange
Comments
Post a Comment