我有5个CSS类。它们完全相同,除了一行不同。是否有一种方法创建一个CSS类,然后让这5个其他CSS类从这个类继承,并只添加自己特定的内容?
如下所示,您可以看到唯一不同的行是这一行...
background-image: url("../Images/vertTabsButton2.gif");
如下所示,您可以看到唯一不同的行是这一行...
background-image: 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;
}