手风琴

Bootstrap超炫垂直手风琴列表特效

阿里云


这是一款基于 Bootstrap 网格系统和 Collapse 插件制作的炫酷垂直手风琴列表特效。该特效对原生的 Bootstrap Accordion 进行美化,制作非常美观的垂直手风琴效果。

使用方法:

在页面中引入 bootstrap 的相关文件。

也想出现在这里?联系我们
创客主机
  1. <link rel="stylesheet" type="text/css" href="/path/to/bootstrap.min.css">
  2. <script src="/path/to/bootstrap.min.js"></script>

HTML 结构:

该垂直手风琴特效的 HTML 结构如下:

  1. <div class="container">
  2.     <div class="row">
  3.         <div class="col-md-offset-3 col-md-6">
  4.             <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
  5.                 <div class="panel panel-default">
  6.                     <div class="panel-heading" role="tab" id="headingOne">
  7.                         <h4 class="panel-title">
  8.                             <a role="button" data-toggle="collapse" data-parent="#accordion"
  9.                               href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
  10.                                 Section 1
  11.                             </a>
  12.                         </h4>
  13.                     </div>
  14.                     <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
  15.                         <div class="panel-body">
  16.                             ......
  17.                         </div>
  18.                     </div>
  19.                 </div>
  20.                 ......
  21.             </div>
  22.         </div>
  23.     </div>
  24. </div>

CSS 样式:

用于美化该垂直手风琴的 CSS 样式也非常简单,如下:

  1. a:hover,a:focus{
  2.     text-decoration: none;
  3.     outline: none;
  4. }
  5. #accordion .panel{
  6.     border: none;
  7.     box-shadow: none;
  8.     border-radius: 0;
  9.     margin-top: 0;
  10. }
  11. #accordion .panel-heading{
  12.     padding: 0;
  13.     border-radius: 0;
  14.     border: none;
  15. }
  16. #accordion .panel-title a{
  17.     display: block;
  18.     font-size: 16px;
  19.     font-weight: bold;
  20.     color: #f7c59f;
  21.     padding: 15px 48px 15px 20px;
  22.     background: #e16b47;
  23.     position: relative;
  24.     transition: all 0.3s ease 0s;
  25. }
  26. #accordion .panel-title a.collapsed{
  27.     color: #e16b47;
  28.     background: #f7c59f;
  29.     border-bottom: 1px solid #3d3537;
  30. }
  31. #accordion .panel-title a:after,
  32. #accordion .panel-title a.collapsed:after{
  33.     content: "";
  34.     display: block;
  35.     width: 3px;
  36.     height: 100%;
  37.     position: absolute;
  38.     top: 0;
  39.     right: 30px;
  40.     background: #f7c59f;
  41. }
  42. #accordion .panel-title a.collapsed:after{
  43.     background: #e16b47;
  44. }
  45. #accordion .panel-title a:before,
  46. #accordion .panel-title a.collapsed:before{
  47.     content: "\f068";
  48.     font-family: FontAwesome;
  49.     width: 25px;
  50.     height: 25px;
  51.     line-height: 25px;
  52.     border-radius: 50%;
  53.     background: #f7c59f;
  54.     position: absolute;
  55.     top: 12px;
  56.     right: 19px;
  57.     font-size: 14px;
  58.     color: #e16b47;
  59.     text-align: center;
  60.     z-index: 1;
  61. }
  62. #accordion .panel-title a.collapsed:before{
  63.     content: "\f067";
  64.     color: #f7c59f;
  65.     background: #e16b47;
  66. }
  67. #accordion .panel-body{
  68.     background: #e16b47;
  69.     color: #f7c59f;
  70.     padding: 20px 50px 15px 20px;
  71.     line-height: 25px;
  72.     border: none;
  73.     position: relative;
  74. }
  75. #accordion .panel-body:after{
  76.     content: "";
  77.     display: block;
  78.     width: 3px;
  79.     height: 100%;
  80.     background: #f7c59f;
  81.     position: absolute;
  82.     top: 0;
  83.     right: 30px;
  84. }

Bootstrap 超炫垂直手风琴列表特效

已有 572 人购买
查看演示升级 VIP立刻购买

演示地址 下载地址
收藏
(0)

发表回复

热销模板

Ashade - 作品展示摄影相册WordPress汉化主题
LensNews

本站承接 WordPress / PbootCMS / DedeCMS 等
系统建站、仿站、开发、定制等业务!