gpt4 book ai didi

javascript - 如何旋转 Accordion 正文?

转载 作者:行者123 更新时间:2023-11-30 16:42:40 27 4
gpt4 key购买 nike

我正在使用 Accordion 功能在我的模块中添加端口详细信息。我只想在水平方向上显示正文内容。请看下面的 fiddle 。

html, body {
background-color:#e9eaed;
}

.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 a {
float:right;
text-decoration:none;
padding: 10px 430px;
margin: -10px -430px;
}
.panel-body {
height:830px;
}
.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;
}
<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 about something pertinant to the site which people could read should the feel the need to read about it. They could skip it as well but this keeps the initial view a good deal less text heavy, see?<br>- Some Source</p>
</div>
</div>
</div>

</div>
</div>
</div>
</div>

http://jsfiddle.net/xct25urv/

在这里,我只想以水平方式显示正文内容,并且不更改标题格式。页眉仅是垂直的。 body 只想要水平。

请帮帮我,我该怎么做?

最佳答案

试试这个,

我刚刚在你的 css 中添加了 transform

.panel-body {
padding: 15px;
transform: rotate(90deg);//added
transform-origin: 188px 241px 0;//added
}

Demo

我希望这是用来实现你所需要的!!!

关于javascript - 如何旋转 Accordion 正文?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31700626/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com