diff --git a/100_projects/75-cover-uncover-an-image/index.html b/100_projects/75-cover-uncover-an-image/index.html new file mode 100644 index 0000000..bf0c4b7 --- /dev/null +++ b/100_projects/75-cover-uncover-an-image/index.html @@ -0,0 +1,23 @@ + + + + + + + DOC + + + + +
+ + rose + +
+ +

Sensitive Content

+

This image contains sensitive content which some people may find offensive or disturbing.

+
+
+ + \ No newline at end of file diff --git a/100_projects/75-cover-uncover-an-image/rebootanika.jpg b/100_projects/75-cover-uncover-an-image/rebootanika.jpg new file mode 100644 index 0000000..2fa04cb Binary files /dev/null and b/100_projects/75-cover-uncover-an-image/rebootanika.jpg differ diff --git a/100_projects/75-cover-uncover-an-image/style.css b/100_projects/75-cover-uncover-an-image/style.css new file mode 100644 index 0000000..2ac7768 --- /dev/null +++ b/100_projects/75-cover-uncover-an-image/style.css @@ -0,0 +1,71 @@ +*{ + margin: 0; + padding: 0; + font-family: "Montserrat", sans-serif; + box-sizing: border-box; +} + +body{ + min-height: 100vh; + display: flex; + align-items: center; + justify-content: center; +} + +.image-card{ + width: 450px; + overflow: hidden; + position: relative; +} + +.image-card img{ + width: 100%; + transition: all .5s ease-in-out; + filter: blur(20px); +} + +.content{ + position: absolute; + top: 50%; + transform: translateY(-50%); + text-align: center; + color: #fff; + padding: 0 40px; + transition: .6s; +} + +.content h3{ + margin: 10px; +} + +.toggle-btn{ + appearance: none; + position: absolute; + bottom: 0; + color: #fff; + z-index: 1; + border-top: 1px solid #ffffff50; + padding: 20px; + margin: 0 40px; + width: calc(100% - 80px); + text-align: center; + cursor: pointer; +} + +.toggle-btn::before{ + content: "See Image"; + transition: .3s; + font-size: 16px; +} + +.toggle-btn:checked ~ img{ + filter: blur(0); +} + +.toggle-btn:checked::before{ + content: "Cover Image"; +} + +.toggle-btn:checked ~ .content{ + pointer-events: none; + opacity: 0;} \ No newline at end of file