Solved

CSS3 Traingular Buton

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Filktering Alphabetically 8 29
Remove Space when printing webpage - Setup in Print.css 3 12
Javascript 2 20
Bootstrap 3 - Style a dropdown 1 11
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

839 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