web299.com
全部
教育
语言/资格考试
法律
互联网
政务民生
Word模板
Excel模板
PPT模板
网页特效
小程序模板
网站模板
首页
教育
语言/资格考试
法律
互联网
政务民生
Word模板
Excel模板
PPT模板
网页特效
小程序模板
网站模板
当前位置:
首页
>
网页特效
>
导航菜单
CSS3垂直手风琴Accordion特效
分类:
导航菜单
日期:
2024-05-14
点击(1)
评论(0)
演 示
免费下载
简介
在页面中引入jquery和bootstrap相关文件。 ```html
``` ##### HTML结构 该CSS3垂直手风琴的HTML结构如下: ```html
Section 1
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Section 2
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Section 3
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
``` ##### CSS样式 然后通过下面的CSS3代码来对该垂直手风琴进行效果的美化。 ```html a:hover,a:focus{ text-decoration: none; outline: none; } #accordion:before{ content: ""; width: 1px; height: 80%; background: #550527; position: absolute; top: 20px; left: 24px; bottom: 20px; } #accordion .panel{ border: none; border-radius: 0; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15); margin: 0 0 12px 50px; position: relative; } #accordion .panel:before{ content: ""; width: 2px; height: 100%; background: linear-gradient(to bottom, #688e26 0%,#ff816a 100%); position: absolute; top: 0; left: -2px; } #accordion .panel-heading{ padding: 0; background: #fff; position: relative; } #accordion .panel-heading:before{ content: ""; width: 15px; height: 15px; border-radius: 50px; background: #fff; border: 1px solid #550527; position: absolute; top: 50%; left: -48px; transform: translateY(-50%); } #accordion .panel-title a{ display: block; padding: 15px 55px 15px 30px; font-size: 20px; font-weight: 600; color: #550527; border: none; margin: 0; position: relative; } #accordion .panel-title a:before, #accordion .panel-title a.collapsed:before{ content: "\f068"; font-family: fontawesome; width: 25px; height: 25px; line-height: 25px; border-radius: 50%; font-size: 15px; font-weight: normal; color: #688e26; text-align: center; border: 1px solid #688e26; position: absolute; top: 50%; right: 25px; transform: translateY(-50%); transition: all 0.5s ease 0s; } #accordion .panel-title a.collapsed:before{ content: "\f067"; } #accordion .panel-body{ padding: 0 30px 15px; border: none; font-size: 14px; color: #305275; line-height: 28px; } ```
相关推荐
html5浪漫粒子表白文字特效
SlidesJS幻灯片特效
html5瀑布流相册特效
css3 svg实现的情人节表白鲜花动画特效
t-scroll.js基于ES6的DOM元素,过渡动画库插件
纯js写省市区三级联动效果
广告
广告