title: A triangle in CSS that takes the whole width with a fixed height?
body: <p>I'm trying to make a triangle in CSS that takes the whole width of the parent with a fixed height.</p>
  
  <p>I successfully did so with a linear-gradient like this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.triangle {
      width: 100%;
      height: 120px;
      background: linear-gradient(to right bottom, blue 50%, transparent 50%);
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="triangle"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>But the diagonal doesn't look crisp. How could I do the same in CSS without using gradient?</p>