Hello.

Tell me, please, it is necessary to make a hat from a right triangle. Through what will be better and more correctly to implement it?
I tried through img, it seems to me not a good option, since the quality of the edges of the picture was intermittent.
I read about svg, as I understood, a line is drawn there. Would it be possible, in this case, for example, to fill the resulting triangle with some color and place a menu on it, so that everything works correctly? Or do it better through css via border? And if done through css, will not the invisible area block the content that is under it?

    1 answer 1

    It is possible through CSS, simply turning the inner rectangle to the desired angle and cutting it off to the outside. Border has nothing to do with it.

    • one
      @knes, drawing a triangle using a border , perhaps, is a classic way of drawing a triangle with CSS. An example can be found here: apps.eky.hk/css-triangle-generator - VenZell
    • Yep But, I'm afraid, this is quite a complicated way for the case when there will be content inside the triangle. And if the content still falls on top, then why not expand the rectangle? - knes