I'm currently displaying 2 triangles on the bottom of my page, one on the left and one on the right. The right triangle is transparent. Both triangles have one color.
I want the triangle-bottom-right to have an additional gradient level (additional color stops).
It should go from left to right, start with rgba(70, 70, 70, 0.15) and end with rgba(70, 70, 70, 0). The target browser is Chrome (running through Electron).
The resulting triangles should be able to resize to the browser width, the height is constant.
My CSS:
.triangle-footer {
position: relative;
bottom: 0px;
height: 176px;
width: 100%;
}
.triangle-bottom-left {
position: absolute;
width: 40%;
height: 100%;
left: 0px;
bottom: 0px;
background: linear-gradient(to right top, rgba(94, 194, 82, 100) 50%, rgba(255, 255, 255, 0) 50%);
}
.triangle-bottom-right {
position: absolute;;
width: 125%;
height: 140%;
right: 0px;
bottom: 0px;
background: linear-gradient(to left top, rgba(70, 70, 70, 0.15) 50%, rgba(255, 255, 255, 0) 50%);
}
My HTML:
<div class="ui fixed bottom sticky triangle-footer">
<div class="triangle-bottom-left"></div>
</div>
<div class="ui fixed bottom sticky triangle-footer">
<div class="triangle-bottom-right"></div>
</div>
(Using Semantic-UI for the bottom stickyness)
Live Example: http://jsfiddle.net/fu2dhfdv/1/
triangle-bottom-rightto start wíth one color one the left, and end with a different color on the right.