jquery - Paste text untill 100% height -
i'm trying make script copy/paste text, until 100% screen height has been reatched:
<p class="text">jeg er 19 år og elsker sprut, penge og ligegyldig sex ahhh.</p>
but lost how should it, know can done jquery, not sure how?
this css div around text area text should placed in:
.centermarg { font-size: 35px; margin: 0 auto; text-align: center; height: 100%; max-height: 100%; }
if don't wnat content go go beyond bottom (scroll) need discount text height or use overflow: hidden
in css.
var b = $('.container'), t = $('.text'); while (b.height() < window.innerheight) { t.clone().appendto(b); }
.text { font-size: 35px; margin: 0 auto; text-align: center; height: 100%; max-height: 100%; }
<div class="container"> <p class="text">jeg er 19 år og elsker sprut, penge og ligegyldig sex ahhh.</p> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
Comments
Post a Comment