Search
 
SCRIPT & CODE EXAMPLE
 

CSS

make triangle using div

// css clip
<div id="triangle"></div>

#triangle {
	background-color: #003BDE;
	clip-path: polygon(50% 0, 100% 100%, 0 100%);
	width: 100px;
	height: 100px;
}
Comment

how to make a triangle in css

.triangle{
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid red;
  border-width:100px;
}
Comment

triangle css

#triangle {
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-bottom: 30px solid blue;
}
Comment

css triangle

#triangle-up {
  width: 0;
  height: 0;
  border-left: 50px solid transparent;
  border-right: 50px solid transparent;
  border-bottom: 100px solid red;
}
Comment

css triangle

<div class="arrow-up"></div>
<div class="arrow-down"></div>
<div class="arrow-left"></div>
<div class="arrow-right"></div>

.arrow-up {
  width: 0; 
  height: 0; 
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  
  border-bottom: 5px solid black;
}

.arrow-down {
  width: 0; 
  height: 0; 
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  
  border-top: 20px solid #f00;
}

.arrow-right {
  width: 0; 
  height: 0; 
  border-top: 60px solid transparent;
  border-bottom: 60px solid transparent;
  
  border-left: 60px solid green;
}

.arrow-left {
  width: 0; 
  height: 0; 
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent; 
  
  border-right:10px solid blue; 
}
Comment

triangle css

/*corner triangles if you want normal triangles look at other answers*/
    #triangle-topleft {
      width: 0;
      height: 0;
      border-top: 100px solid red;
      border-right: 100px solid transparent;
    }
    #triangle-topright {
      width: 0;
      height: 0;
      border-top: 100px solid red;
      border-left: 100px solid transparent;
    }
    #triangle-bottomleft {
      width: 0;
      height: 0;
      border-bottom: 100px solid red;
      border-right: 100px solid transparent;
    }

    #triangle-topright {
      width: 0;
      height: 0;
      border-top: 100px solid red;
      border-left: 100px solid transparent;
    }
  
Comment

PREVIOUS NEXT
Code Example
Css :: easiest way to invert css to dark mode 
Css :: break word css 
Css :: text-align:center apply to parent div or child div 
Css :: flex direction 
Css :: css transition slide up 
Css :: css parallelogram 
Css :: bootstrap 3 offset 
Css :: css dark mode 
Css :: css grow 
Css :: rgb gold color 
Css :: how to add fade-in with page transition 
Css :: css orange color 
Css :: show all available virtual environments python 
Css :: macbook change screenshot to jpg 
Css :: background image css stack overflow 
Css :: css selector not contain 
Css :: no hover effect css 
Css :: text gradient css3 
Css :: onhover mouse pointer css 
Css :: style scrollbar overflow-y 
Css :: how to let flex child take whole width 
Css :: bash list all npm processes 
Css :: javascript canvas pixel art 
Css :: css disable button click 
Css :: chenge number of lines of text in css 
Css :: Media Query smartphone only 
Css :: canvas disable antialiasing 
Css :: kill docker by image name 
Css :: how to change button gradient 
Css :: glass css 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =