javascript - Scrolling text for narrative in web adventure game -
i can not seem exact effect want. text scroll bottom of text area, 1 time bottom of text entry has scrolled view stop scrolling. text entry may longer text field, user able scroll through text if want.
i have played around marquee , javascript, have not been able desired effect. prefer remain away 3rd party plugins, party larn myself, , partly don't have worry future support.
so can give me pointers on how setup up?
you can animate div..
var c = $("#container"); var speed = 10000; var thediv = $("#mydiv"); thediv.show() thediv.animate({ top: c.height() - thediv.height() - 10}, speed, function () { thediv.css("height", c.height()); thediv.css("top", 0); var objdiv = document.getelementbyid("mydiv"); objdiv.scrolltop = objdiv.scrollheight; });
you'll want mess around formatting some...here's fiddle http://jsfiddle.net/kmd97/dmkmz/
javascript jquery css text scroll
No comments:
Post a Comment