Improved Modals
This commit is contained in:
parent
178e1c1390
commit
30a75c2f55
4 changed files with 35 additions and 5 deletions
|
|
@ -21,9 +21,18 @@
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
border: 1px solid lighten($background, 10%);
|
border: 1px solid lighten($background, 10%);
|
||||||
width: 80%;
|
width: 80%;
|
||||||
|
height: 80%;
|
||||||
|
height: auto;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.5);
|
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.5);
|
||||||
|
|
||||||
|
img {
|
||||||
|
display: block;
|
||||||
|
margin: auto;
|
||||||
|
width: 80%;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
||||||
|
|
@ -386,12 +386,21 @@ body {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
border: 1px solid #3f3f3f;
|
border: 1px solid #3f3f3f;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
|
height: 80%;
|
||||||
|
height: auto;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
-webkit-box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.5);
|
-webkit-box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.5);
|
||||||
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.5);
|
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.5);
|
||||||
/* The Close Button */
|
/* The Close Button */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.modal-content img {
|
||||||
|
display: block;
|
||||||
|
margin: auto;
|
||||||
|
width: 80%;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.modal-content .container {
|
.modal-content .container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
20
index.html
20
index.html
|
|
@ -456,12 +456,12 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card">
|
<div class="card" for-modal="card-modal-demo">
|
||||||
<h3 class="header">Card 3</h3>
|
<h3 class="header">Card 3</h3>
|
||||||
<p class="content">
|
<p class="content">
|
||||||
Here, have a very nice lorem picsum image courtesy of <span
|
Click on me!<br><br>
|
||||||
class="code">i.picsum.photos/id/107/5760/3840.jpg</span>
|
|
||||||
<img class="" src="https://i.picsum.photos/id/107/5760/3840.jpg">
|
By click on this card, you should see a Modal pop up as a result with an image!
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -469,6 +469,18 @@
|
||||||
|
|
||||||
<!-- MODALS: -->
|
<!-- MODALS: -->
|
||||||
|
|
||||||
|
<div id="card-modal-demo" class="modal">
|
||||||
|
<div class="modal-content">
|
||||||
|
<span class="close">
|
||||||
|
<i class="fa fa-close"></i>
|
||||||
|
</span>
|
||||||
|
<h3 class="header">
|
||||||
|
Card Modal Demo
|
||||||
|
</h3>
|
||||||
|
<img class="" src="https://i.picsum.photos/id/107/5760/3840.jpg">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="testModal" class="modal">
|
<div id="testModal" class="modal">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<span class="close">
|
<span class="close">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue