我有以下代码:
HTML
<div class="container-fluid">
<div class="row-fluid">
<div id="col2" class="span0"></div>
<div id="col1" class="span12">
<a id="trig" class="btn btn-inverse">Reflow Me</a>
</div>
</div>
</div>
CSS
.row-fluid div {
height: 200px;
-webkit-transition: width 0.3s ease, margin 0.3s ease;
-moz-transition: width 0.3s ease, margin 0.3s ease;
-o-transition: width 0.3s ease, margin 0.3s ease;
transition: width 0.3s ease, margin 0.3s ease;
}
.row-fluid .span0 {
width: 0%;
}
#col1 {
background-color: #A6BFBA;
}
#col2 {
background-color: #DE4124;
}
#trig {
margin: 50px;
}
.row-fluid .span0 + [class*="span"]{
margin-left: 0;
}
JS
$('#trig').on('click', function () {
$('#col1').toggleClass('span12 span3');
$('#col2').toggleClass('span0 span9');
});
您如何使上面的确切代码适用于 Bootstrap 3.0 中的滑动切换?