Translate element with the text flow will give the scrollbar
Translate element with the text flow will give the scrollbar.
if we translate element to the right of to the down we will get scrollbar, but if we translate it to the left or to the top we won't. (for LTR languages)
<section>
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.
<div class="rotated"></div>
</section>
<div>
</div>
CSS
HTML {
font-size: 16px;
line-height: 1.5;
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
DIV {
display: inline-block;
width: 150px;
height: 150px;
margin: .5em auto;
background: #888;
}
.rotated {
margin-top: 3em;
transform: translate(25em, -10em) rotate(45deg); /*if we translate element to the right of to the down we will get scrollbar, but if we translate it to the left or to the top we won't. (for LTR languages)*/
}
SECTION {
max-width: 40%;
margin: 1em auto;
padding: 1em;
border: 1px solid;
overflow: auto;
}
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.