Hellow,
This will be a very quick and short guide on how to code any button of your liking into real by ONLY using CSS and without slicing as images.
ALL the buttons here are compatible with the following browsers:
IE8+
Chrome
Safari
Opera
Firefox3+
Syntax
Standard
To add linear gradient from top to bottom starting from black and ending with white
background: linear-gradient (top,#000000,#FFFFFF);
Safari 5.1, Chrome 10+
background: -webkit-linear-gradient (top,#000000,#FFFFFF);
Safari 4-5, Chrome 1-9
background: -webkit-gradient (linear,top,bottom, from(#000000), to(#FFFFFF));
Firefox 3.6+
background: -moz-linear-gradient (top,#000000,#FFFFFF);
IE 10+
background: -ms-linear-gradient (top,#000000,#FFFFFF);
Opera 11.10+
background: -o-linear-gradient (top,#000000,#FFFFFF);
Ex:
Type: Linear Gradient
Starting color: #0d66e0
Ending Color: #74a0dc
This will be a very quick and short guide on how to code any button of your liking into real by ONLY using CSS and without slicing as images.
ALL the buttons here are compatible with the following browsers:
IE8+
Chrome
Safari
Opera
Firefox3+
Gradient
Syntax
Standard
To add linear gradient from top to bottom starting from black and ending with white
background: linear-gradient (top,#000000,#FFFFFF);
Safari 5.1, Chrome 10+
background: -webkit-linear-gradient (top,#000000,#FFFFFF);
Safari 4-5, Chrome 1-9
background: -webkit-gradient (linear,top,bottom, from(#000000), to(#FFFFFF));
Firefox 3.6+
background: -moz-linear-gradient (top,#000000,#FFFFFF);
IE 10+
background: -ms-linear-gradient (top,#000000,#FFFFFF);
Opera 11.10+
background: -o-linear-gradient (top,#000000,#FFFFFF);
Ex:
Type: Linear Gradient
Starting color: #0d66e0
Ending Color: #74a0dc
- #btn{
- background: linear-gradient(top, #0d66e0, #74a0dc);
- background: -webkit-gradient(linear,top,bottom,from(#0d66e0),to(#74a0dc));
- background: -webkit-linear-gradient(top, #0d66e0, #74a0dc);
- background: -moz-linear-gradient(top, #0d66e0, #74a0dc);
- background: -ms-linear-gradient(top, #0d66e0, #74a0dc);
- background: -o-linear-gradient(top, #0d66e0, #74a0dc);
- width:150px;
- height:50px;
- color:white;
- text-align:center;
- line-height:45px;
- }
Type: Radial Gradient
Starting color: #474444
Ending Color: #7e7b7b
No comments:
Post a Comment