Noch nicht viel geschrieben
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Scrollbar</title>
<link href="perfect-scrollbar-master/src/perfect-scrollbar.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script src="perfect-scrollbar-master/src/jquery.mousewheel.js"></script>
<script src="perfect-scrollbar-master/src/perfect-scrollbar.js"></script>
<style>
* {
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box; }
textarea {
display: block;
height: 100%;
width: 142px;
border: none;
margin-bottom: 8px;
padding: 0;
resize: none;
overflow-y: hidden;}
div {
width: 150px;
height: 150px;
position: relative;
margin: 0px auto;
padding: 0px;
overflow: hidden;
}
</style>
<script type="text/javascript">
$(function() {
$('div').perfectScrollbar();
$('div').on('keyup','textarea',function(){
$(this).height(0).height( this.scrollHeight );
$('div').scrollTop($(this).outerHeight());
$('div').perfectScrollbar('update');
});
$('div').find( 'textarea' ).keyup();
});
</script>
</head>
<body>
<div>
<textarea>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sodales urna non odio egestas tempor. Nunc vel vehicula ante. Etiam bibendum iaculis libero, eget molestie nisl pharetra in. In semper consequat est, eu porta velit mollis nec.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sodales urna non odio egestas tempor. Nunc vel vehicula ante. Etiam bibendum iaculis libero, eget molestie nisl pharetra in. In semper consequat est, eu porta velit mollis nec.>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sodales urna non odio egestas tempor. Nunc vel vehicula ante. Etiam bibendum iaculis libero, eget molestie nisl pharetra in. In semper consequat est, eu porta velit mollis nec.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sodales urna non odio egestas tempor. Nunc vel vehicula ante. Etiam bibendum iaculis libero, eget molestie nisl pharetra in. In semper consequat est, eu porta velit mollis nec.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sodales urna non odio egestas tempor. Nunc vel vehicula ante. Etiam bibendum iaculis libero, eget molestie nisl pharetra in. In semper consequat est, eu porta velit mollis nec.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sodales urna non odio egestas tempor. Nunc vel vehicula ante. Etiam bibendum iaculis libero, eget molestie nisl pharetra in. In semper consequat est, eu porta velit mollis nec.
</textarea>
</div>
</body>
</html>
<link href="perfect-scrollbar-master/src/perfect-scrollbar.css" />
<link href="perfect-scrollbar-master/src/perfect-scrollbar.css" rel="stylsheet" />
Willkommen auf PSD-Tutorials.de
In unseren Foren vernetzt du dich mit anderen Personen, um dich rund um die Themen Fotografie, Grafik, Gestaltung, Bildbearbeitung und 3D auszutauschen. Außerdem schalten wir für dich regelmäßig kostenlose Inhalte frei. Liebe Grüße senden dir die PSD-Gründer Stefan und Matthias Petri aus Waren an der Müritz. Hier erfährst du mehr über uns.
Nächster neuer Gratisinhalt
Statistik des Forums