基于Bootstrap的垂直手风琴动画特效

黄舟
Release: 2017-01-18 13:42:46
Original
1542 people have browsed it

简要教程

这是一款基于Bootstrap的垂直手风琴特效。该垂直手风琴特效基于原生的Bootstrap Accordion组件来制作,通过CSS3来对它进行美化,效果美观大方。

使用方法

 HTML结构

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

......
Copy after login

CSS样式

该垂直手风琴特效的美化CSS样式如下:

a:hover,a:focus{
    text-decoration: none;
    outline: none;
}
#accordion .panel{
    border: none;
    box-shadow: none;
    border-radius: 0;
    margin-bottom: -5px;
}
#accordion .panel-heading{
    padding: 0;
    border-radius: 0;
    border: none;
    text-align: center;
}
#accordion .panel-title a{
    display: block;
    padding: 25px 30px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background: #333;
    border-bottom: 1px solid #4a4a4a;
    position: relative;
    transition: all 0.5s ease 0s;
}
#accordion .panel-title a:hover{
    background: #4a4a4a;
}
#accordion .panel-title a:after,
#accordion .panel-title a.collapsed:after{
    content: "\f067";
    font-family: FontAwesome;
    font-size: 15px;
    font-weight: 200;
    position: absolute;
    top: 25px;
    left: 15px;
    transform: rotate(135deg);
    transition: all 0.5s ease 0s;
}
#accordion .panel-title a.collapsed:after{
    transform: rotate(0deg);
}
#accordion .panel-body{
    background: #167ea0;
    padding: 0 0 0 40px;
    border: none;
    position: relative;
}
#accordion .panel-body p{
    font-size: 14px;
    color: #fff;
    line-height: 25px;
    background: #3296b7;
    padding: 30px;
    margin: 0;
}
#accordion .panel-collapse .panel-body p{
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.5s ease-in-out 0s;
}
#accordion .panel-collapse.in .panel-body p{
    opacity: 1;
    transform: scale(1);
}
Copy after login

以上就是基于Bootstrap的垂直手风琴动画特效的内容,更多相关内容请关注PHP中文网(www.php.cn)!


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!