Solved

CSS3 Traingular Buton

Posted on 2013-11-14
4
285 Views
Last Modified: 2013-11-17
i am trying to create a css3 traingular button with arrow to its right side with a gradient effect, but i am unable to do it, can you guide me please, attached is the image

attached is the image

i want to do the gradient effect on the image same like the image,
Untitled.png
0
Comment
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 30

Accepted Solution

by:
Alexandre Simões earned 450 total points
ID: 39647797
Triangles are fairly easy to create using a CSS trick...

Here I play with it a bit: http://jsfiddle.net/z9c3n/

<div class="button bg-gradient">
    <span class="button">My button</span>
    <span class="arrow-right"></span>
</div>

.arrow-right {
    position: absolute;
    right: 0;
    top: 0;
    height: 0;
    width: 0;
    display: inline-block;
    border: solid 25px #fff;
    border-left: solid 25px transparent;
}

.button{
    width: 150px;
    height: 40px;
    position: relative;
    padding: 10px 30px 0 10px;
}

.bg-gradient {
    background: -moz-linear-gradient(top,  rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0.65)), color-stop(100%,rgba(0,0,0,0))); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top,  rgba(0,0,0,0.65) 0%,rgba(0,0,0,0) 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top,  rgba(0,0,0,0.65) 0%,rgba(0,0,0,0) 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top,  rgba(0,0,0,0.65) 0%,rgba(0,0,0,0) 100%); /* IE10+ */
    background: linear-gradient(to bottom,  rgba(0,0,0,0.65) 0%,rgba(0,0,0,0) 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a6000000', endColorstr='#00000000',GradientType=0 ); /* IE6-9 */
}

Open in new window

0
 
LVL 30

Expert Comment

by:Alexandre Simões
ID: 39647800
Here's a good source for gradients: http://www.colorzilla.com/gradient-editor/
0
 
LVL 12

Assisted Solution

by:Nathan Riley
Nathan Riley earned 50 total points
ID: 39649128
Here you are, it creates it for you then you just copy and past the code.

http://cssarrowplease.com/
0
 
LVL 16

Author Closing Comment

by:Gurpreet Singh Randhawa
ID: 39655517
Thanks guys, Awesome
0

Featured Post

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question