javascript - How to add scrollbar inside container in accordion? -
i using accordion. here, accordion functionality working. want insert vertical, , horizontal scrollbar in body content. how add scroll bar inside of panel-body content. have included fiddle , code.
html, body { background-color:#e9eaed; } .content { width:960px; height:0px; margin-right: auto; margin-left: auto; } .panel-group { width:430px; z-index: 100; -webkit-backface-visibility: hidden; -webkit-transform: translatex(-100%) rotate(-90deg); -webkit-transform-origin: right top; -moz-transform: translatex(-100%) rotate(-90deg); -moz-transform-origin: right top; -o-transform: translatex(-100%) rotate(-90deg); -o-transform-origin: right top; transform: translatex(-100%) rotate(-90deg); transform-origin: right top; } .panel-heading { width: 430px; } .panel-title { height:18px } .panel-title { float:right; text-decoration:none; padding: 10px 430px; margin: -10px -430px; } .panel-body { height:830px; transform: rotate(90deg); transform-origin: 188px 241px 0; } .panel-group img { -webkit-backface-visibility: hidden; -webkit-transform: translatex(0%) rotate(90deg); -webkit-transform-origin: left top; -moz-transform: translatex(0%) rotate(90deg); -moz-transform-origin: left top; -o-transform: translatex(0%) rotate(90deg); -o-transform-origin: left top; transform: translatex(0%) rotate(90deg); transform-origin: left top; } .panel-group p { -webkit-backface-visibility: hidden; -webkit-transform: translatex(0%) rotate(90deg); -webkit-transform-origin: left top; -moz-transform: translatex(0%) rotate(90deg); -moz-transform-origin: left top; -o-transform: translatex(0%) rotate(90deg); -o-transform-origin: left top; transform: translatex(0%) rotate(90deg); transform-origin: left top; } .panel-group .panel img { margin-left:400px; position: absolute; }
<div class="container"> <div class="row"> <div class="content"> <div class="panel-group" id="accordion"> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"> <a data-toggle="collapse" data-parent="#accordion" href="#collapseone"> accordion 1 </a> </h4> </div> <div id="collapseone" class="panel-collapse collapse"> <div class="panel-body"> <p><h1>title</h1><br>a paragraph of text pertinant site people read should feel need read it. skip keeps initial view deal less text heavy, see?<br>- source</p> </div> </div> </div> </div> </div> </div> </div>
in fiddle want insert scrollbar inside body-content. please me how can this.
for simple horizontal/vertical scroll bar inside panel-body can add 2 div inside panel-body like
<div class="panel-body"> <div class="t1"> <div class="t2"> content goes here.....</div> </div>
and alter css like
.panel-body { height:830px; width: 600px; overflow: hidden; transform: rotate(90deg); transform-origin: 188px 241px 0; } .t1 { max-height: 390px; overflow: scroll; } .t2 { height: 320px; width: 720px; }
you'll simple window scroll further can use plugin malihufancyscroll fancy looking scrollbars.
Comments
Post a Comment