国产chinesehdxxxx野外,国产av无码专区亚洲av琪琪,播放男人添女人下边视频,成人国产精品一区二区免费看,chinese丰满人妻videos

App下載
首頁javascriptclassJavascript Style - 如何使用!important標(biāo)志通過DOM設(shè)置CSS屬性

Javascript Style - 如何使用!important標(biāo)志通過DOM設(shè)置CSS屬性

我們想知道如何使用!important標(biāo)志通過DOM設(shè)置CSS屬性。

<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
#test {
  padding: 1em;
  font-size: 50px;
  font-weight: bold;
  color: red !important;
}
</style>
</head>
<body>
  <div id="test">This is a test</div>
  <script type='text/javascript'>
var elem = document.getElementById('test');
elem.style.setProperty( 'color', 'green', 'important' );

</script>
</body>
</html>