AMP:如何更改amp-accordion标题的背景颜色?

时间:2016-09-29 15:16:42

标签: background-color amp-html

我正在尝试用amp-accordion改变标题的背景颜色。我能够做到这一点的唯一方法是将样式应用于无效的.-amp-accordion-header

2 个答案:

答案 0 :(得分:5)

如果您尝试按照其他答案中的建议覆盖类 <kendo-chart *ngIf="series.length >0"> <kendo-chart-value-axis> <kendo-chart-value-axis-item *ngFor="let item of values; trackBy: item?.name" [name]="item.name" [pane]="item.pane" [visible]="false"> </kendo-chart-value-axis-item> </kendo-chart-value-axis> <kendo-chart-panes> <kendo-chart-pane *ngFor="let item of panes; trackBy: item?.name" [height]="ALTURA" [name]="item.name" [clip]="false" [margin]="{ top: 27, bottom: 9 }" [border]="{ color: '#B6B6B6', width: 0 }"></kendo-chart-pane> </kendo-chart-panes> <kendo-chart-category-axis> <kendo-chart-category-axis-item *ngFor="let item of categories; trackBy: item?.name" baseUnit="days" [max]="dataFim" [min]="dataInicio" [name]="item.name" [pane]="item.pane" type="date" [visible]="false" [majorGridLines]="{width:0.5}"> <kendo-chart-category-axis-item-crosshair [visible]="true"> <kendo-chart-category-axis-item-crosshair-tooltip [visible]="true"></kendo-chart-category-axis-item-crosshair-tooltip> </kendo-chart-category-axis-item-crosshair> </kendo-chart-category-axis-item> <kendo-chart-category-axis-item-labels visible="true"> </kendo-chart-category-axis-item-labels> </kendo-chart-category-axis> <kendo-chart-legend [visible]="true" position="custom" orientation="horizontal" offsetX=100></kendo-chart-legend> <kendo-chart-area [width]="WIDTH" [height]="HEIGHT_TOTAL" [margin]="{bottom:0, top:0, left: 0, right: MARGIN}"></kendo-chart-area> <kendo-chart-series> <kendo-chart-series-item *ngFor="let item of series; trackBy: item?.name" [data]="item.data" [axis]="item.axis" [categoryAxis]="item.axis" categoryField="date" [color]="item.color" [aggregate]="lastValue" [name]="item.name" [type]="item.type" field="value" [missingValues]="interpolate" [errorLowField]="low" [errorHighField]="high"> <kendo-chart-series-item-markers [visible]="true" [border]="{'color':checkLimitsColors(item.minimo, item.maximo, value, item.color)}"> </kendo-chart-series-item-markers> </kendo-chart-series-item> </kendo-chart-series> <kendo-chart-tooltip [visible]="true" [shared]="true"></kendo-chart-tooltip> </kendo-chart> ,则AMP验证程序会引发错误。

我通过创建自己的类修复了这个问题:

.-amp-xxxxx

我将该类添加到标题中:

.myheader {
    background-color:yellow; 
}

答案 1 :(得分:1)

你在.-amp-accordion-header更改它是正确的。也许你错过了代码。这是一个example from GitHub

/* heading element*/
.-amp-accordion-header {
    cursor: pointer;
    background-color: #efefef;
    padding-right: 20px;
    border: solid 1px #dfdfdf;
}