Skip to content

Commit 896df33

Browse files
authored
Merge pull request #857 from VINAYMADIVAL/feature/mondrian-composition
Add a Mondrian-style composition Art using only HTML and CSS.
2 parents f70f330 + 93b224e commit 896df33

File tree

3 files changed

+90
-0
lines changed

3 files changed

+90
-0
lines changed

Mondrian-Composition/index.html

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>Mondrian Art</title>
8+
<style>
9+
body {
10+
display: flex;
11+
justify-content: center;
12+
align-items: center;
13+
height: 100vh;
14+
margin: 0;
15+
padding: 0;
16+
}
17+
.container{
18+
display: inline-grid;
19+
background-color: black;
20+
gap: 9px;
21+
grid-template-columns: 320px 198px 153px 50px;
22+
grid-template-rows: 414px 130px 155px 11px;
23+
}
24+
25+
.red{
26+
background-color: #E72F24;
27+
}
28+
.item{
29+
background-color: #F0F1EC;
30+
}
31+
.white1{
32+
grid-area: 1/2/2/5;
33+
}
34+
.white2{
35+
grid-area: 2/1/4/2;
36+
}
37+
.white3{
38+
grid-area: 4/1/6/2;
39+
}
40+
.white4{
41+
grid-area: 2/2/4/4;
42+
}
43+
.white5{
44+
grid-area: 3/4/6/5;
45+
margin-top: 10px;
46+
}
47+
.yellow{
48+
background-color: #F9D01E ;
49+
grid-area: 4/2/6/3;
50+
}
51+
.blue{
52+
background-color: #004592 ;
53+
grid-area: 2/4/3/5;
54+
}
55+
.black{
56+
background-color:#232629 ;
57+
grid-area: 4/3/6/4;
58+
}
59+
@media (max-width:1250px){
60+
.container{
61+
grid-template-columns: 160px 99px 76px 25px;
62+
grid-template-rows: 207px 65px 78px 6px;
63+
}
64+
}
65+
</style>
66+
</head>
67+
68+
<body>
69+
<div class="container">
70+
<div class="red"></div>
71+
<div class="item white1"></div>
72+
<div class="item white2"></div>
73+
<div class="item white3"></div>
74+
<div class="item white4"></div>
75+
<div class="item white5"></div>
76+
<div class="black"></div>
77+
<div class="yellow"></div>
78+
<div class="blue"></div>
79+
</div>
80+
</body>
81+
82+
</html>

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ Please be aware that the demos may exhibit significant accessibility issues, suc
7878
- [MasterCard](#mastercard)
7979
- [Mobile Menu Off Canvas](#mobile-menu-off-canvas)
8080
- [Modal/Popup](#modalpopup)
81+
- [Mondrian Composition](#mondrian-composition)
8182
- [Mouse Tracking](#mouse-tracking)
8283
- [Multi Step Checkout](#multi-step-checkout)
8384
- [NavBar](#navbar)
@@ -506,6 +507,13 @@ Your browser does not support the video tag.
506507

507508
---
508509

510+
## <a id="mondrian-composition"></a>Mondrian Composition
511+
[<img src="images/mondrian_composition.png" height="230" title="Mondrian Art Demo">](https://codepen.io/VINAY-MADIVAL/pen/VYerdxY)
512+
513+
**[⬆ back to top](#quick-links)**
514+
515+
---
516+
509517
## <a id="Mouse"></a>Mouse tracking
510518

511519
[<img src="images/mousetracking.png" height="230" title="Demo 1">](https://codepen.io/Momciloo/pen/GoGRrQ)

images/mondrian_composition.png

6.08 KB
Loading

0 commit comments

Comments
 (0)