Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.2/normalize.min.css" rel="stylesheet" type="text/css" />
<div class="triangle">
  <span class="text">Text text text text text</span>
</div>
 
body {
  background-color: #c3deef;
  background-size: cover;
}
.triangle {
  color: #000;
  text-align: center;
  overflow: hidden;
  position: relative;
  padding-bottom: 50px;
  & > .text {
    display: block;
    padding: 10px;
    background-color: #73a0be;
  }
  &:after {
    position: absolute;
    left: 0;
    content: "";
    width: 100%;
    height: 35px;
    background-image: linear-gradient(to top right, transparent 48%, #c3deef 2%, #73a0be 50%),
                      linear-gradient(to top left, transparent 48%, #c3deef 2%, #73a0be 50%);
    background-position: top left, top right;
    background-repeat: no-repeat;
    background-size: 50.1% 100%;
  }
}
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers