How can I make a background image with one diagonal side?
I want to do it with CSS, CSS3 or jQuery and not with photoshop.I also need help creating the border on the diagonal side.
Asked
Active
Viewed 707 times
-3
-
Please, tell us what you tried... Show us some code. – Salketer Feb 23 '16 at 07:47
1 Answers
0
Here's how you can put a triangle in an div. This should help you get started.
div {
background-color: red;
width: 200px;
height: 200px;
}
div::after {
content: ' ';
border-top: 200px solid rgba(0, 0, 0, 0);
border-right: 50px solid #000;
width: 0px;
display: block;
float: right;
}
<div></div>

Salketer
- 14,263
- 2
- 30
- 58