Add a CSS property value:
w3.addStyle(
selector,'
property','
value')
Add a red background color to an element with id="London":
<button onclick="w3.addStyle('#London','background-color','red')">Add Style</button>
Add a red background color to all <h2> elements:
<button onclick="w3.addStyle('h2','background-color','red')">Add Style</button>
Add a red background color to all elements with class="city":
<button onclick="w3.addStyle('.city','background-color','red')">Add Style</button>
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!