I have a container element that I am trying to figure out if I can shape it to have two 45 degree angles. Like this:
It is simply a rectangle now:
<div id="home-img-text">
<div id="home-img-text-container">
<div id="home-img-text-description">WRECKING <br>& DEMOLITION <br> DONE RIGHT.</div>
</div>
</div>
#home-img-text-container {
background: rgba(0,0,0,.8);
padding: 30px 20px;
}
#home-img-text-description {
color: #FFF;
font-size: 2.5em;
line-height: 1.4em;
}
How would I go about doing this?
UPDATE:
.home-img-text {
position: absolute;
left: 10%;
top: 25%;
}
#home-img-text-container1, #home-img-text-container2 {
position: relative;
margin-bottom: 20px;
background: rgba(0,0,0,.8);
opacity: 0;
transition:1s; -webkit-transition:1s;
overflow: hidden;
}
#home-img-text-container1.fadeDisplay {
opacity: 1;
transform: translateX(30px); -webkit-transform: translateX(30px);
}
#home-img-text-container2.fadeDisplay {
opacity: 1;
transform: translateX(30px); -webkit-transform: translateX(30px);
}
#home-img-text-description {
position: relative;
margin: 40px 0px;
padding: 30px 20px;
color: #FFF;
font-size: 2.5em;
line-height: 1.4em;
}
#home-img-text-description2 {
color: #FFF;
font-size: 2em;
line-height: 1.4em;
padding: 30px 20px;
}
/*----Adding this ---*/
#home-img-text-description:before {
position: absolute;
content: '';
height: 40px;
width: 100%;
left: 0px;
background: inherit;
}
#home-img-text-description:before {
top: -40px;
transform: skewX(45deg);
transform-origin: right bottom;
}