2013-10-21 6 views
2

CSS에서는 배경 이미지에 밑줄을 사용자 정의 할 수 있습니다. 이 기술은 여기에 설명 : 새우새우를 사용한 사용자 정의 밑줄

enter image description here

, 내가 인라인 서식을 사용하고 알고있는 유일한 밑줄 :

http://alistapart.com/article/customunderlines

, 나는 이런 식으로 뭔가를 할 수있는이 기술을 사용

text "<u>Ugly Underline</u>", size: 60, inline_format: TRUE 

enter image description here

약간의 차이점이 있지만 그래픽 디자이너로서이 점이 큰 차이가 있습니다.

나는 새우를 사용하여 사용자 정의 밑줄을 할 수있는 기술이 있는지 아는 사람 있습니까?

답변

0

: formatted_text_box에 대한 콜백 옵션을 선택합니다.

class CustomUnderlineCallback 

    def initialize(options) 
    @document = options[:document] 
    end 

    def render_in_front(fragment) 
    @document.stroke_color COLOR_WHITE 
    @document.stroke_polygon fragment.bottom_left, fragment.bottom_right 
    @document.stroke_color COLOR_BLACK 
    end 

end 
0

이 시도 :

table([["Does this work?"]] , :cell_style => {:borders => [:bottom]}) 

설정하는 옵션이 있습니다 border-colorwidth 등 내가 사용하는 결국