Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 类和id选择器在AntennaHouse格式化程序中不工作_Css_Xml_Print Css_Antenna House - Fatal编程技术网

Css 类和id选择器在AntennaHouse格式化程序中不工作

Css 类和id选择器在AntennaHouse格式化程序中不工作,css,xml,print-css,antenna-house,Css,Xml,Print Css,Antenna House,我是CSS打印新手,正在使用AH Formatter Lite V6.6为XML文档制作模板。 我无法让选课员工作 例如,源代码段: <section class="meta_Materials_(Structured)"> <title>Materials</title> <para class="Body_Text">None.</para> </section> .Body_Text{ fon

我是CSS打印新手,正在使用AH Formatter Lite V6.6为XML文档制作模板。 我无法让选课员工作

例如,源代码段:

<section class="meta_Materials_(Structured)">
    <title>Materials</title>
    <para class="Body_Text">None.</para>
</section>
.Body_Text{
    font-family:'HelveticaNeueLT Std LT';
    font-size:8.5pt;
    line-height:12pt;
    font-weight:300;
    font-style:normal;
    color: black;
}
。。。没有任何效果

这同样适用于id选择器。我验证了通过的模板,尝试了各种等效的选择器para.Body_Text、section para.Body_Text、section>para.Body_Text,但都没有成功

我不能在文档中的任何位置选择任何类或id,尽管我可以选择元素


给出了什么?

当源文档是XML而不是HTML或XHTML时,class属性没有什么特别之处。要使用class属性,必须匹配它或它的值,就像对任何其他属性一样:

*[class ~= "Body_Text"] {
    font-family:'HelveticaNeueLT Std LT';
    font-size:8.5pt;
    line-height:12pt;
    font-weight:300;
    font-style:normal;
    color: red;
}

还没有接受者吗?类和id选择器在Chrome和Edge中按预期工作。我还删除了文档中的所有样式,只留下了一个类选择器,但在AHF中仍然没有运气。谢谢,这就解释了!