<!--以下是XML文档--> <?xml version="1.0" encoding="GB2312"?> <?xml-stylesheet type="text/css" href="student.css"?> <!DOCTYPE student[ <!ELEMENT student (stu)*> <!ELEMENT stu (name,sex,height)> <!ELEMENT name (#PCDATA)> <!ELEMENT sex (#PCDATA)> <!ELEMENT height (#PCDATA)> ]> <student> <stu ID="a110"> <name>A</name> <sex>male</sex> <height>175</height> </stu> <stu ID="a111"> <name>B</name> <sex>male</sex> <height>172</height> </stu> </student> /*以下是CSS文档*/ student { display:list-item; list-style-type:square; font-size:24pt; }
为什么显示不出square的实行方框呢?
另外,我试了disc、decimal、lower-roman、upper-roman、lower-alPha、upper-alPha,无论哪种外部浏览器还是XMLWriter内部的浏览器,显示效果都如图所示。只有试了circle,在XMLWriter中浏览器才能看到,其他显示器也显示为下面的样子。
要设置list-style-position:inside
我不知道你这种事什么写法,但是如果是我的话,我会这么写
<?xml version="1.0" encoding="GB2312"?> <?xml-stylesheet type="text/css" href="student.css"?> <!DOCTYPE student[ <!ELEMENT student (stu)*> <!ELEMENT stu (name,sex,height)> <!ELEMENT name (#PCDATA)> <!ELEMENT sex (#PCDATA)> <!ELEMENT height (#PCDATA)> <style> student { display:list-item; list-style-type:square; font-size:24pt; } </style> <student> <!--<stu ID="a110"> <name>A</name> <sex>male</sex> <height>175</height> </stu> <stu ID="a111"> <name>B</name> <sex>male</sex> <height>172</height> </stu>--> <ul id="a110"> <li>name:A</li> <li>sex:male</li> <li>height:175</li> </ul> <ul id="a111"> <li>name:B</li> <li>sex:male</li> <li>height:172</li> </ul> </student>