bootstrap自适应手风琴式折叠文字效果代码

代码语言:html

所属分类:其他

代码描述:bootstrap自适应手风琴式折叠文字效果代码

代码标签: bootstrap 手风琴 折叠 文字 自适应

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/bootstrap.3.3.4.css">
    <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/font-awesome-4.7.0/css/font-awesome.min.css">
    <style type="text/css">
        .container {
	padding:5em 0;
	background:#fff;
}
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;
}
    </style>
</head>

<body>
    <div class="container">
        <div class="row">
            <div class="col-md-offset-3 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">
       .........完整代码请登录后点击上方下载按钮下载查看

网友评论0