2012-08-23 3 views
2

아래 HTML/CSS는 최근 브라우저에서는 작동하지만 CF9의 cfdocument에서는 작동하지 않습니다. 아이디어가있는 사람은 누구입니까?ColdFusion cfdocument CSS 카운터 증가 카운터

무엇을 알고 있습니까? 예! CF의 cfdocument가 제한된 CSS 속성 집합을 지원한다는 것을 알고 있습니다. CF 설명서에 카운터 리셋, 카운터 증가 및 카운터가 지원된다고 나와 있습니다.

예상 출력
식료품 :
1) 사과
2) 바나나
3) Cantelopes

<cfdocument format="PDF" pagetype="letter" 
    margintop="0.5" marginbottom="0.5" 
    marginleft="0.5" marginright="0.5"> 
<html> 
<head> 
    <style type="text/css"> 
     li { list-style-type: none; } 
     ol { counter-reset: ordered; 
      padding-left: 0.5em; 
      border: solid 1px #F00; 
     } 
     li:before { counter-increment: ordered; 
      content: counter(ordered) ") "; 
     } 
    </style> 
</head> 
<body> 
    <strong>GROCERIES:</strong><br> 
    <ol> 
     <li>Apples</li> 
     <li>Bananas</li> 
     <li>Cantelopes</li> 
    </ol> 
</body> 
</html> 
</cfdocument> 
+0

1 :

식료품 : 그것은 숫자 뒤에 소수점을 가지고있다 속성 목록 :) – Leigh

+0

참조 : cfdocument 's 지원되는 CSS 속성 [link] (http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7c21.html) – ArdMan

답변

1

은 내가 지정하는 데 도움이 될 수 있습니다 생각 예제 코드 list-style-type, 이것은 여러분에게 가까이 가야합니다. 아르 자형. 지원되는 읽기 위해

  1. ) 사과
  2. ) 바나나
  3. ) Cantelopes

<cfdocument format="PDF" pagetype="letter" 
    margintop="0.5" marginbottom="0.5" 
    marginleft="0.5" marginright="0.5"> 
<html> 
<head> 
    <style type="text/css"> 
     ol {list-style-type: none;} 
     li:before {content: counter(section, decimal) ") ";} 
     li { counter-increment: section;} 
    </style> 
</head> 
<body> 
    <strong>GROCERIES:</strong><br> 
    <ol> 
     <li>Apples</li> 
     <li>Bananas</li> 
     <li>Cantelopes</li> 
    </ol> 
</body> 
</html> 
</cfdocument> 
+0

감사합니다. 나는 당신의 모범을 가지고 놀았습니다. CSS가 정확하지 않다는 것을 알지 못했습니다. li : cfdocument에서 예상대로 작동합니다. 그것은 나타나지 않는 카운터입니다. 알렉! – ArdMan

+0

카운터가 나타나지 않는다는 것은 무엇을 의미합니까? 나의 예는 1.) 2.) 등. –

+0

FWIW, 나는 팀과 같은 결과를 얻는다. 위의 정확한 코드를 사용 했습니까? 어떤 CF 버전을 실행하고 있습니까? – Leigh