Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Draw Text W/ JS Using CSS Stylesheet?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #176624
    css-user2
    Participant

    Hello,

    I am trying to have text with a style defined in the CSS portion be drawn on the canvas. I have looked into drawing text on the canvas with shadowColor, but the shadows don’t look quite right. Any suggestions would be appreciated.

    stylesheet.css

    .red{
     color:#FF6666;
     text-shadow: 0 1px 0 #ccc,
     0 2px 0 #c6c6c6,
     0 3px 0 #bbb,
     0 4px 0 #b6b6b6,
     0 5px 0 #aaa,
     0 6px 1px rgba(0,0,0,.1),
     0 0 5px rgba(0,0,0,.1),
     0 1px 3px rgba(0,0,0,.3),
     0 3px 5px rgba(0,0,0,.2),
     0 5px 10px rgba(0,0,0,.25),
     0 10px 10px rgba(0,0,0,.2),
     0 20px 20px rgba(0,0,0,.15);
    }
    #176627
    css-user2
    Participant

    Thank you for replying Soronbe. I would like to achieve something like the text style in the link, but drawn on a canvas in JS.

    Link

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.