Hi al, I did a pyramid design for a client’s homepage (Go to https://abdju.com) using clip-path CSS property, and now I need to gracefully let other browsers that won’t show the pyramid via clip-path to show rectangles… I’ve used the following css for the pyramid:
/* CSS Document
* im inside Child theme
*/
.pyramid .et_pb_row {
padding:0px;
}
body {
background:black;
font-size: 125%;
display: flex;
align-items: flex-end;
height: 100%;
padding:0;}
.pyramid {
background: black;
height:768px;
}
.zone {
background-color: transparent;
padding: 0 1em;
filter: drop-shadow(0 1em 1em rgba(0, 0, 0, 0.1));
}
.zone:nth-child(1) {
background: #32174e url("https://abdju.com/wp-content/themes/Divi-child/pyramid/images/i-and-I-250x165px.png") top center no-repeat;
animation-fill-mode: forwards;
background-blend-mode: multiply;
transition: background-color 0.5s;
-webkit-clip-path: polygon(50% 0, 62% 100%, 38% 100%);
clip-path: polygon(50% 0, 62% 100%, 38% 100%);
}
img { max-width:100%; height: auto;}
.zone:nth-child(1):hover {
background-color: #8b56c2;
color: #ffffff;
}
.zone:nth-child(2) {
-webkit-clip-path: polygon(38% 0, 62% 0, 73.75% 100%, 26.5% 100%);
clip-path: polygon(38% 0, 62% 0, 74% 100%, 26.25% 100%);
background: #dd0000 url("https://abdju.com/wp-content/themes/Divi-child/pyramid/images/blog-640x165.png") top center no-repeat;
animation-fill-mode: forwards;
background-blend-mode: multiply;
transition: background-color 0.01s; }
.zone:nth-child(2):hover {
background-color: #fff8dc;
}
.papyrus {
-webkit-clip-path: polygon(52.5% 0, 100% 0, 100% 100%, 25% 100%);
clip-path: polygon(52.5% 0, 100% 0, 100% 100%, 25% 100%);
background: #f5c70f url("https://abdju.com/wp-content/themes/Divi-child/pyramid/images/papyrus-500x165px.png") top right no-repeat;
animation-fill-mode: forwards;
background-blend-mode: multiply;
transition: background-color 0.05s; }
.papyrus:hover, .soundvibes:hover {
background-color: #b8860b;
}
.soundvibes {
-webkit-clip-path: polygon(0 0, 49% 0, 77% 100%, 0 100%);
clip-path: polygon(0 0, 49% 0, 77% 100%, 0 100%);
background: #f5c70f url("https://abdju.com/wp-content/themes/Divi-child/pyramid/images/soundvibes-320x165.png") top left no-repeat;
color: #362f2d
animation-fill-mode: forwards;
background-blend-mode: screen;
transition: background-color 0.01s; }
.zone:nth-child(4) {
background: #095309 url("https://abdju.com/wp-content/themes/Divi-child/pyramid/images/sight-up-1024x250px.png") top left no-repeat;
-webkit-clip-path: polygon(13.5% 0, 87.5% 0, 100% 100%, 0 100%);
clip-path: polygon(13.5% 0, 87.5% 0, 100% 100%, 0 100%);
animation-fill-mode: forwards;
background-blend-mode: multiply;
transition: background-color 0.05s; }
.zone:nth-child(4):hover {
background-color: #228B22
}
/* style fix */
.papyrus.et_pb_column_1_2 {
margin-left: 4%;
}
.soundvibes.et_pb_column_1_2,
.papyrus.et_pb_column_1_2 {
float: left;
width: 46% !important
}
/*.et_pb_column_4_4 {
text-align: center;
}
.papyrus p {
line-height: 7em;
}
.soundvibes p {
}
.et_pb_column_4_4.center {
}*/
.papyrus.et_pb_column_1_2,
.soundvibes.et_pb_column_1_2,
.zone.et_pb_column_4_4 {
height: 165px;
}
/* last */
.zone:nth-child(4n) {
width: 95% !important;
margin: 0 auto;
}
.homepage .et_pb_section {margin:0;
padding:0;}
/*media queries */
@media only screen and (max-width: 400px) {
.pyramid {
width: 400px;
height: 575px;
height: auto;
margin: 0 auto;}
.papyrus.et_pb_column_1_2,
.soundvibes.et_pb_column_1_2,
.zone.et_pb_column_4_4 {
height: 70px;
}
}
@media only screen and (min-width: 400px) and (max-width: 500px) {
.pyramid {
width: 300px;
height: 575px;
height: auto;
margin: 0 auto;}
.papyrus.et_pb_column_1_2,
.soundvibes.et_pb_column_1_2,
.zone.et_pb_column_4_4 {
height: 90px;
}
}
@media only screen and (min-width: 500px) and (max-width: 767px) {
.pyramid {
width: 500px;
height: 575px;
height: auto;
margin: 0 auto;}
.papyrus.et_pb_column_1_2,
.soundvibes.et_pb_column_1_2,
.zone.et_pb_column_4_4 {
height: 110px;
}
}
@media only screen and (min-width: 768px) and (max-width: 1024px) {
.pyramid {
width: 740px;
height: 575px;
height: auto;
margin: 0 auto; }
.papyrus.et_pb_column_1_2,
.soundvibes.et_pb_column_1_2,
.zone.et_pb_column_4_4 {
height: 130px;
}
}
@media only screen and (min-width: 1024px) and (max-width: 1200px) {
.pyramid {
width: 1024px;
height: 575px;
height: auto;
margin: 0 auto; }
.papyrus.et_pb_column_1_2,
.soundvibes.et_pb_column_1_2,
.zone.et_pb_column_4_4 {
height: 150px;
}
}
@media only screen and (min-width: 1200px) {
.pyramid {
width: 1024px;
height: 575px;
height: auto;
margin: 0 auto; }
.papyrus.et_pb_column_1_2,
.soundvibes.et_pb_column_1_2,
.zone.et_pb_column_4_4 {
height: 165px;
}
}
/* Microsoft Edge Browser 12+ (All) - @supports method */
@supports (-ms-ime-align:auto) {
.pyramid div {
width:100%;
height: 165px;
margin:0;
padding:0px;
}
.zone {
background-color: transparent;
padding: 0 1em;
filter: drop-shadow(0 1em 1em rgba(0, 0, 0, 0.1));
}
.zone:nth-child(1) {
background: #32174e url("https://adbdju.com/wp-content/themes/Divi-child/pyramid/images/i-and-I-1024x200.png") top center no-repeat;
animation-fill-mode: forwards;
background-blend-mode: multiply;
transition: background-color 0.5s;
}
img { max-width:100%; height: auto;}
.zone:nth-child(1):hover {
background-color: #8b56c2;
color: #ffffff;
}
.zone:nth-child(2) {
background: #dd0000 url("https://adbdju.com/wp-content/themes/Divi-child/pyramid/images/blog-1024x200.png") top center no-repeat;
animation-fill-mode: forwards;
background-blend-mode: multiply;
transition: background-color 0.01s; }
.zone:nth-child(2):hover {
background-color: #fff8dc;
}
.papyrus {
background: #f5c70f url("https://adbdju.com/wp-content/themes/Divi-child/pyramid/images/papyrus-1024x200px.png") top right no-repeat;
animation-fill-mode: forwards;
background-blend-mode: multiply;
transition: background-color 0.05s; }
.papyrus:hover, .soundvibes:hover {
background-color: #b8860b;
}
.soundvibes {
background: #f5c70f url("https://adbdju.com/wp-content/themes/Divi-child/pyramid/images/soundvibes-1024x200px.png") top left no-repeat;
color: #362f2d
animation-fill-mode: forwards;
background-blend-mode: screen;
transition: background-color 0.01s; }
.zone:nth-child(4) {
background: #095309 url("https://adbdju.com/wp-content/themes/Divi-child/pyramid/images/sight-up-1024x200px.png") top left no-repeat;
animation-fill-mode: forwards;
background-blend-mode: multiply;
transition: background-color 0.05s; }
.zone:nth-child(4):hover {
background-color: #228B22
}
}
/* Internet Explorer 10+, Microsoft Edge Browser */
_:-ms-lang(x),
.pyramid div {
width:100%;
height: 165px;
margin:0;
padding:0px;
}
.pyramid div {
width:100%;
height: 165px;
margin:0;
padding:0px;
}
.zone {
background-color: transparent;
padding: 0 1em;
filter: drop-shadow(0 1em 1em rgba(0, 0, 0, 0.1));
}
.zone:nth-child(1) {
background: #32174e url("https://adbdju.com/wp-content/themes/Divi-child/pyramid/images/i-and-I-1024x200.png") top center no-repeat;
animation-fill-mode: forwards;
background-blend-mode: multiply;
transition: background-color 0.5s;
}
img { max-width:100%; height: auto;}
.zone:nth-child(1):hover {
background-color: #8b56c2;
color: #ffffff;
}
.zone:nth-child(2) {
background: #dd0000 url("https://adbdju.com/wp-content/themes/Divi-child/pyramid/images/blog-1024x200.png") top center no-repeat;
animation-fill-mode: forwards;
background-blend-mode: multiply;
transition: background-color 0.01s; }
.zone:nth-child(2):hover {
background-color: #fff8dc;
}
.papyrus {
background: #f5c70f url("https://adbdju.com/wp-content/themes/Divi-child/pyramid/images/papyrus-1024x200px.png") top right no-repeat;
animation-fill-mode: forwards;
background-blend-mode: multiply;
transition: background-color 0.05s; }
.papyrus:hover, .soundvibes:hover {
background-color: #b8860b;
}
.soundvibes {
background: #f5c70f url("https://adbdju.com/wp-content/themes/Divi-child/pyramid/images/soundvibes-1024x200px.png") top left no-repeat;
color: #362f2d
animation-fill-mode: forwards;
background-blend-mode: screen;
transition: background-color 0.01s; }
.zone:nth-child(4) {
background: #095309 url("https://adbdju.com/wp-content/themes/Divi-child/pyramid/images/sight-up-1024x200px.png") top left no-repeat;
animation-fill-mode: forwards;
background-blend-mode: multiply;
transition: background-color 0.05s; }
.zone:nth-child(4):hover {
background-color: #228B22
}
Can anyone help me to resolve the css for Internet Explorer, or any browser that won’t render ‘clip-path’. The image attached shows the browser support for clip-path…