【发布时间】:2015-04-30 13:09:17
【问题描述】:
这是我的代码,
<html>
<head>
<style>
.containerTitle {
background-color:silver;
text-align:center;
font-family:'Segoe UI';
font-size:18px;
font-weight:bold;
height:30px;
}
</style>
</head>
<body>
<div id="a"/>
</body>
</html>
如何使用 jquery 更改 containerTitle 样式中的背景颜色..
【问题讨论】:
-
你的 html 中的
.containerTitle类在哪里? -
还有一点,应该是
-
切换一个类并编写一个包含这两个类的规则,并在样式表中设置您想要的属性。最容易撤消
标签: javascript jquery html