Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9008299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:54:35+00:00 2026-06-16T01:54:35+00:00

How could one go about dynamically generating a shape like this in CSS3: Ignore

  • 0

How could one go about dynamically generating a shape like this in CSS3:

enter image description here

Ignore the borders, as the important aspects are:

- The gradient in the arrow body, and that the gradient lasts from the tip to the end of the arrow.
- The length of the square part will vary.

I tried the regular :after method of adding a triangle to the end of a div element, but I couldn’t get the gradient to span both the tip and the body properly.

Fiddle: http://jsfiddle.net/rtuY9/8/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T01:54:36+00:00Added an answer on June 16, 2026 at 1:54 am

    You can try something like this – DEMO

    div {
        width: 50px;
        height: 100px;
        position: relative;
        margin: 100px;
    
        background: -webkit-linear-gradient(top, #1e5799 0%,#2989d8 100%);
        background:    -moz-linear-gradient(top, #1e5799 0%, #2989d8 100%);
    }
    
    div:after {
        z-index: -1;
        content: "";
        display: block;
        position: absolute;
        left: -125px;
        top: -51px;
        margin: 100px;
        height: 100px;
        width: 100px;
        background: #c00;
    
        -webkit-transform:rotate( -45deg );
           -moz-transform:rotate( -45deg );
                transform:rotate( -45deg );
    
        background: -webkit-linear-gradient(45deg, #1e5799 0%, #2989d8 50%, #ffffff 50%, #ffffff 100%);
        background:    -moz-linear-gradient(45deg, #1e5799 0%, #2989d8 50%, #ffffff 50%, #ffffff 100%);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

One could think of this case as follows: The application dynamically loads a module,
Is there any way that one could extract the information about UI elements (of
Is something like this possible? If so, could you point me in the right
I once heard about a software that could dynamically run dotnet instructions (C#, if
Could one help translating following sed command so it does the same on aix
How could one test whether a set of modules is installed, given the names
Problem in short: How could one implement static if functionality, proposed in c++11, in
When adding a new Entity Framework object to a database, how could one have
could someone one the current list of managed Beans or classes in Java EE
Could any one tell me how to enable SOCKET support in PHP ?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.