Solved

CSS3 Traingular Buton

Posted on 2013-11-14
4
281 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
  • 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 11

Assisted Solution

by:N R
N R 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

786 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