"Portfolio using Panels No JavaScript!"
Bootstrap 3.0.3 Snippet by mouse0270

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container" style="margin-top:10px;">
<div class="row form-group">
<div class="col-xs-12 col-md-6">
<div class="panel panel-default">
<div class="panel-image">
<img src="http://666a658c624a3c03a6b2-25cda059d975d2f318c03e90bcf17c40.r92.cf1.rackcdn.com/unsplash_52d09387ae003_1.JPG" class="panel-image-preview" />
<label for="toggle-1"></label>
</div>
<input type="checkbox" id="toggle-1" class="panel-image-toggle">
<div class="panel-body">
<h4>Title of Image</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed in lobortis nisl, vitae iaculis sapien. Phasellus ultrices gravida massa luctus ornare. Suspendisse blandit quam elit, eu imperdiet neque semper et.</p>
</div>
<div class="panel-footer text-center">
<a href="#download"><span class="glyphicon glyphicon-download"></span></a>
<a href="#facebook"><span class="fa fa-facebook"></span></a>
<a href="#twitter"><span class="fa fa-twitter"></span></a>
<a href="#share"><span class="glyphicon glyphicon-share-alt"></span></a>
</div>
</div>
</div>
<div class="col-xs-12 col-md-6">
<div class="panel panel-default">
<div class="panel-image hide-panel-body">
<img src="http://666a658c624a3c03a6b2-25cda059d975d2f318c03e90bcf17c40.r92.cf1.rackcdn.com/unsplash_52cf9489095e8_1.JPG" class="panel-image-preview" />
<label for="toggle-2"></label>
</div>
<input type="checkbox" id="toggle-2" class="panel-image-toggle">
<div class="panel-body">
<h4>Title of Image</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed in lobortis nisl, vitae iaculis sapien. Phasellus ultrices gravida massa luctus ornare. Suspendisse blandit quam elit, eu imperdiet neque semper et.</p>
</div>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@import url("http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css");
.panel-image {
position: relative;
}
.panel-image img.panel-image-preview {
width: 100%;
border-radius: 4px 4px 0px 0px;
}
.panel-image label {
display: block;
position: absolute;
top: 0px;
left: 0px;
height: 100%;
width: 100%;
}
.panel-heading ~ .panel-image img.panel-image-preview {
border-radius: 0px;
}
.panel-body {
overflow: hidden;
}
.panel-image ~ input[type=checkbox] {
position:absolute;
top:- 30px;
z-index: -1;
}
.panel-image ~ input[type=checkbox] ~ .panel-body {
height: 0px;
padding: 0px;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments:

Great job!

Amit rajput () - 8 years ago - Reply 0


Como hacer que cuando se abra uno nuevo se cierre el otro, tengo varios y quiero que al darle click a uno nuevo se cierre el otro.

Jimdo Hackercrack () - 9 years ago - Reply 0


i can't see the snippet . everytime i click on html, css or js i can't see any snippet. what's the problem ? is it browser issue or anything else ?

Humayoun Kabir () - 9 years ago - Reply 0


thanks

Calvin Tam () - 10 years ago - Reply 0


Great job :)

Zoran Vitez () - 10 years ago - Reply 0


Not sure if this was a typo or on purpose, but on certain lines instead of "class=" there was "class-"

Like on line 28: <input type="checkbox" id="toggle-2" class-"panel-image-toggle"="">

Deanna () - 10 years ago - Reply 0


Nope, it was a typo. It is my most common typo besides spelling. haha. Thank you for letting me know.

mouse0270 () - 10 years ago - Reply 0