Javascript 如何通过JQuery修改样式属性?

Javascript 如何通过JQuery修改样式属性?,javascript,html,css,Javascript,Html,Css,我有UI框架生成的元素,如下所示: <div id="GENERATED_CONTAINER" style="position: fixed; z-index: 100; left: 368px; top: 52px; width: 545px; height: 846px;"> <div id="GENERATED_CONTENT style="opacity: 0.1; left: 5px; top: 5px; bottom: -5px; width: 545px;

我有UI框架生成的元素,如下所示:

<div id="GENERATED_CONTAINER" style="position: fixed; z-index: 100; left: 368px; top: 52px; width: 545px; height: 846px;">
    <div id="GENERATED_CONTENT style="opacity: 0.1; left: 5px; top: 5px; bottom: -5px; width: 545px; height: 846px;">
    </div>
</div>

只需编写
.css

$("[id^='GENERATED_']").css({
  width: 'inherit', //or the value
  height: 'inherit' //or the value
})

只需编写
.css

$("[id^='GENERATED_']").css({
  width: 'inherit', //or the value
  height: 'inherit' //or the value
})

可以使用清除内联样式


通过
jQuery.css()
添加和删除的内联样式

可以使用清除内联样式

通过
jQuery.css()
添加和删除的内联样式

$("[id^='GENERATED_']").css({width:0px,height:0px})