<分区>
我有 5 个 CSS 类。除了一条线外,它们完全相同。有没有办法创建一个 CSS 类,然后让其他 5 个 CSS 类继承自该类并添加它自己的特定类?
正如您在下面看到的,唯一不同的是这一行...
背景图片:url("../Images/vertTabsButton2.gif");
.divMasterCol1Button1 {
float: left;
border-style: none;
border-width: thin;
background-image: url("../Images/vertTabsButton1.gif");
background-repeat: no-repeat;
background-position-x: center;
background-position-y: top;
width: 215px;
height: 700px;
margin: 0px auto;
padding: 0px;
text-align: center;
}
.divMasterCol1Button2 {
float: left;
border-style: none;
border-width: thin;
background-image: url("../Images/vertTabsButton2.gif");
background-repeat: no-repeat;
background-position-x: center;
background-position-y: top;
width: 215px;
height: 700px;
margin: 0px auto;
padding: 0px;
text-align: center;
}