Friday, 15 August 2014

jquery - scale text in div layer proportional to container bg-image -



jquery - scale text in div layer proportional to container bg-image -

following problem: have scrolling page lots of divs. every div has bg-image , div text in it.

<div id="intro"> <h1>blabla</h1> <p id="text1_1"> bla bla </p> <p id="text1_2"> , 1 time again bla </p> </div>

i handle bg-image scaling css3's background-size: cover;, when scale browser window text not remain @ same position , not resize proportional bg-image. whats best way this? thanks

there unfortunately no css method solving problem. there jquery plugin trick you, called fittext.

the problem work, font-size property should flexible, right not. way can work around css - if looking such solution - create media queries , cut down font-size in smaller viewports, makes text adaptive.

jquery html css

No comments:

Post a Comment