0

下面是两个css。

我想helpContent拥有所有的风格itemContent。我将如何helpContent继承itemContent

.itemContent {
    BORDER-RIGHT: #ababe3 1px solid;
    BORDER-TOP: #ababe3 1px solid;
    DISPLAY: block;
    PADDING-LEFT: 3px;
    PADDING-BOTTOM: 3px;
    PADDING-TOP: 3px;
    OVERFLOW: hidden;
    BORDER-LEFT: #ababe3 1px solid;
    WORD-WRAP: break-word;
    POSITION: static;
}
.helpContent {
    BACKGROUND: #eff5ff;
}
4

2 回答 2

6

最简单的方法是

.itemcontent, .helpcontent  {
    border-right: #ababe3 1px solid; 
    border-top: #ababe3 1px solid; 
    display: block; 
    padding-left: 3px; 
    padding-bottom: 3px; 
    padding-top: 3px; 
    overflow: hidden; 
    border-left: #ababe3 1px solid; 
    word-wrap: break-word;
    position: static;
}
.helpcontent {
    background: #eff5ff; 
}
于 2013-04-30T07:17:25.867 回答
0

最短的方法是:

.itemcontent, .helpcontent  {
    border: 1px solid #ababe3;
    border-bottom: none;
    display: block; 
    padding: 3px 0 3px 3px; 
    overflow: hidden; 
    word-wrap: break-word;
    position: static;
}
.helpcontent {
    background: #eff5ff; 
}
于 2013-04-30T07:36:32.757 回答