Solved

CSS3 Traingular Buton

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

Author Closing Comment

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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
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 learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

762 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now