Bootstrap Accordion — стиль 68

Подробное описание и демонстрация работы аккордеона под номером №68 для библиотеки Bootstrap. Html и CSS код для реализации accordeon’a на сайте как на изображении.

Демо Аккордиона — стиль 68

Это текст специально написан для демонстрации работы эффекта. Praesent nisl lorem, dictum id pellentesque at, vestibulum ut arcu. Curabitur erat libero, egestas eu tincidunt ac, rutrum ac justo. Vivamus condimentum laoreet lectus, blandit posuere tortor aliquam vitae. Curabitur molestie eros.

Это текст специально написан для демонстрации работы эффекта. Praesent nisl lorem, dictum id pellentesque at, vestibulum ut arcu. Curabitur erat libero, egestas eu tincidunt ac, rutrum ac justo. Vivamus condimentum laoreet lectus, blandit posuere tortor aliquam vitae. Curabitur molestie eros.

Это текст специально написан для демонстрации работы эффекта. Praesent nisl lorem, dictum id pellentesque at, vestibulum ut arcu. Curabitur erat libero, egestas eu tincidunt ac, rutrum ac justo. Vivamus condimentum laoreet lectus, blandit posuere tortor aliquam vitae. Curabitur molestie eros.

html разметка для реализации аккордеона

                        <div class="container">
                            <div class="row">
                                <div class="col-md-6">
                                    <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
                                        <div class="panel panel-default">
                                            <div class="panel-heading" role="tab" id="headingOne">
                                                <h4 class="panel-title">
                                                    <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
                                                        Section 1
                                                    </a>
                                                </h4>
                                            </div>
                                            <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
                                                <div class="panel-body">
                                                    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent nisl lorem, dictum id pellentesque at, vestibulum ut arcu. Curabitur erat libero, egestas eu tincidunt ac, rutrum ac justo. Vivamus condimentum laoreet lectus, blandit posuere tortor aliquam vitae. Curabitur molestie eros. </p>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="panel panel-default">
                                            <div class="panel-heading" role="tab" id="headingTwo">
                                                <h4 class="panel-title">
                                                    <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
                                                        Section 2
                                                    </a>
                                                </h4>
                                            </div>
                                            <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
                                                <div class="panel-body">
                                                    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent nisl lorem, dictum id pellentesque at, vestibulum ut arcu. Curabitur erat libero, egestas eu tincidunt ac, rutrum ac justo. Vivamus condimentum laoreet lectus, blandit posuere tortor aliquam vitae. Curabitur molestie eros. </p>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="panel panel-default">
                                            <div class="panel-heading" role="tab" id="headingThree">
                                                <h4 class="panel-title">
                                                    <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
                                                        Section 3
                                                    </a>
                                                </h4>
                                            </div>
                                            <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
                                                <div class="panel-body">
                                                    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent nisl lorem, dictum id pellentesque at, vestibulum ut arcu. Curabitur erat libero, egestas eu tincidunt ac, rutrum ac justo. Vivamus condimentum laoreet lectus, blandit posuere tortor aliquam vitae. Curabitur molestie eros. </p>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    
css разметка для реализации аккордеона

                        a:hover,a:focus{
                            text-decoration: none;
                            outline: none;
                        }
                        #accordion .panel{
                            border: none;
                            border-radius: 0;
                            margin-bottom: 10px;
                        }
                        #accordion .panel-heading{
                            padding: 0;
                            border-radius: 0;
                        }
                        #accordion .panel-title a{
                            display: block;
                            padding: 15px 20px 15px 30px;
                            background: #9a031e;
                            font-size: 20px;
                            font-weight: 600;
                            color: #fff;
                            text-align: center;
                            border: none;
                            box-shadow: 5px 5px 5px rgba(0,0,0,0.6);
                            position: relative;
                        }
                        #accordion .panel-body{ padding: 15px 0 15px 60px; }
                        #accordion .panel-body p{
                            padding: 15px 20px;
                            margin-bottom: 0;
                            background: #e0af63;
                            font-size: 14px;
                            color: #fff;
                            line-height: 28px;
                            border: 4px double #000;
                            box-shadow: 5px 5px 5px rgba(0,0,0,0.6);
                            position: relative;
                        }
                        #accordion .panel-body p:before{
                            content: "";
                            display: block;
                            width: 5px;
                            height: 50%;
                            position: absolute;
                            border-left: 5px dotted #9a031e;
                            top: 0;
                            left: -40px;
                        }
                        #accordion .panel-body p:after{
                            content: "f061";
                            font-family: "Font Awesome 5 Free";
                            font-weight: 900;
                            font-size: 20px;
                            color: #9a031e;
                            position: absolute;
                            bottom: 40%;
                            left: -35px;
                        }
                    


Теги:
0

Оставить своё мнение

Ваш e-mail не будет опубликован. Обязательные поля помечены *