html - Svg object doesn't scale properly -


i trying making svg object responsive scales nicely when viewing on phone or tablet.

the tutorial used didn't @ all. made text disappear entirely.

yeah, i'm using svg mask text gifs. (please understand i'm have started learn general basics , don't assume know you're saying.)

look @ fiddle details. if jsfiddle not working check live example.

html

<h3> <svg> <pattern id="p-fire" viewbox="30 100 186 200" patternunits="userspaceonuse" width="216" height="200" x="-70" y="20"> <image xlink:href="http://tympanus.net/codrops-playground/assets/images/posts/23145/fire.gif" width="256" height="300"> </image></pattern> <text text-anchor="middle" x="50%" y="50%" dy=".35em" class="animatedtext">             blind guardian         </text> </svg> </h3> 

css

body { background:black }  @font-face {     font-family: "toxia";     src: url(https://dl.dropboxusercontent.com/spa/yf4cv83buq5647x/tappedout/public/toxia.ttf) format("truetype"); }  @font-face {     font-family: "blood";     src: url(https://dl.dropboxusercontent.com/spa/yf4cv83buq5647x/tappedout/public/metal31.ttf) format("truetype"),          url(https://dl.dropboxusercontent.com/spa/yf4cv83buq5647x/tappedout/public/metal31.woff) format("woff"); }  .animatedtext {   fill: url(#p-fire);   stroke: #8b0000;   stroke-width: 0;   stroke-opacity: .5;   font: 4em/1 blood, bold;   text-transform: uppercase;   margin: 0; }  svg {   position: static;   width: 100%;   height: 100%; } 

to make title responsive, have add viewbox svg. example

<svg viewbox="0 0 766 150"> 

also note svg elements , attributes case sensitive (although browsers forgiving) should viewbox, not viewbox.

http://jsfiddle.net/yjlp4kbx/4/


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -