Skip to main content

Creating arrows with CSS

12th October, 2022

Updated: 12th October, 2022

    oldddd :::

    <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;
    }

    References

    https://css-tricks.com/snippets/css/css-triangle/ https://davidwalsh.name/css-triangles


    8345fcca-9b34-425e-8161-02095f8b33e1

    Created on: 12th October, 2022

    Last updated: 12th October, 2022

    Tagged With: