Skip to content

Instantly share code, notes, and snippets.

@alyssamichelle
Created March 4, 2016 15:42
Show Gist options
  • Save alyssamichelle/8938ffa66e81abd6b1a0 to your computer and use it in GitHub Desktop.
Save alyssamichelle/8938ffa66e81abd6b1a0 to your computer and use it in GitHub Desktop.
Katie
<section>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<text x="0" y="50" style="text-rendering: optimizeLegibility; line-interval: 1.5em">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It
has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop
publishing software like Aldus PageMaker including versions of Lorem Ipsum.</text>
</svg>
</section>
var sectionWidth = $("section").width();
// alert(sectionWidth);
$("svg").attr("viewbox", "0 0 100 "+sectionWidth)
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-alpha1/jquery.min.js"></script>
html{
font-size: 10px;
height: 100%;
}
svg {
height: 100%;
width: 100%;
}
text {
font-family: 'Oswald';
font-size: 55px;
line-interval: 1.5em;
text-align: justify;
}
section {
width: 50%;
height: 100%;
margin: 0 auto;
background-color: #e4908e;
border-radius: 1em;
padding: 1em;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment