Hot File

Create the effect button gradient editing using CSS3

View: 839    Dowload: 0   Comment: 0   Post by: hanhga  
Author: none   Category: References   Fields: Other

9 point/6 review File has been tested

Understanding CSS3 will help a lot for you to find a good job later. So today I would like to share with you a simple effect that CSS3 gives us, through this article, you will have a better understanding of how to use animation andkeyframes rule in CSS3. First, you should see the Demo section of this article, or direct download to your computer.

Introduction

Understanding CSS3 will help a lot for you to find a good job later. So today I would like to share with you a simple effect that CSS3 gives us, through this article, you will have a better understanding of how to use animation andkeyframes rule in CSS3. First, you should see the Demo section of this article, or direct download to your computer.

First we will create an html file to contain the button to create the effect.

1
2
3
4
5
6
7
8
9
<a class="button" id="rgb">RGBa>
<a class="button" id="namedcolors">Named Colora>
<br />
<a class="button" id="hue">HUEa>
<a class="button" id="saturation">Saturationa>
<a class="button" id="lightness">Lightnessa>
<br />
<a class="button" id="topflat">Top Flata>
<a class="button" id="bottomflat">Bottom Flata>

Now we will turn to create color transitions for each button (the button) by CSS3:

Step 1: Create common attributes for buttons (button)

01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
.button {
    
    background-image: linear-gradient(
        rgba(255,255,255,0.6),
        rgba(0,0,0,0.6)
    );
 
    display: inline-block;
    height: 70px; width: 120px;
    line-height: 70px;
    margin: 5px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    border-radius: 5px;
    box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2);
}

Step 2: We will create the first color transition effect for RGB buttons (with id = "rgb")

01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
#rgb {
    background-color: #FF0; /* Màu vàng */
    animation: rgb 3s infinite alternate;
    -webkit-animation: rgb 3s infinite alternate; /*Dùng cho Safari và Chrome*/
}
@keyframes rgb {
    /* 0% sẽ có màu mặc định là màu vàng */
    50% {background-color: #06F; /* Màu xanh*/ }
    100% {background-color: #F00; /* Màu đỏ */}
}
 
/*Dùng cho Safari và Chrome*/
@-webkit-keyframes rgb {
    /* 0% sẽ có màu mặc định là màu vàng */
    50% {background-color: #06F; /* Màu xanh*/ }
    100% {background-color: #F00; /* Màu đỏ */}
}

In the css on, our effect will change color over a period of 3 seconds, repeat continuously. To be able to time as well as the number of repetitions of effect is the change in the animation you, even if you want to effect changes how you edit it in partkeyframes with a value between 0% -> 100%.

Step 3: Do the same for the remaining buttons, depending on the display of color that we will have different effects, and you try to refer to the following effect for the remaining button offline.

001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
#namedcolors {
    background-color: red;
    animation: namedcolors 0.3s infinite alternate;
    -webkit-animation: namedcolors 0.3s infinite alternate;/*Dùng cho Safari và Chrome*/
}
@keyframes namedcolors {
    100% {background-color: orange;}
}
/*Dùng cho Safari và Chrome*/
@-webkit-keyframes namedcolors {
    100% {background-color:orange;}
}
 
#hue {
    background-color: hsl(0, 100%, 50%); /* Màu đỏ */
    animation: hue 3s infinite alternate;
    -webkit-animation: hue 3s infinite alternate;
}
@keyframes hue {
    /* hue sẽ chuyển màu từ giá trị 0 -> 360 */
    20% {background-color: hsl(72, 100%, 50%);}
    40% {background-color: hsl(144, 100%, 50%);}
    60% {background-color: hsl(216, 100%, 50%);}
    80% {background-color: hsl(288, 100%, 50%);}
    100% {background-color: hsl(360, 100%, 50%);}
}
 
@-webkit-keyframes hue {
    /* hue sẽ chuyển màu từ giá trị 0 -> 360 */
    20% {background-color: hsl(72, 100%, 50%);}
    40% {background-color: hsl(144, 100%, 50%);}
    60% {background-color: hsl(216, 100%, 50%);}
    80% {background-color: hsl(288, 100%, 50%);}
    100% {background-color: hsl(360, 100%, 50%);}
}
 
#saturation {
    /*0% = màu xám */
    background-color: hsl(0, 0%, 50%);
    animation: saturation 3s infinite alternate;
    -webkit-animation: saturation 3s infinite alternate;
}
@keyframes saturation {
    /*100% = màu đỏ */
    100% {background-color: hsl(0, 100%, 50%); }
}
 
@-webkit-keyframes saturation {
    /*100% = màu đỏ */
    100% {background-color: hsl(0, 100%, 50%); }
}
 
#lightness {
    /*0%  = màu đen */
    background-color: hsl(0, 100%, 0%);
    animation: lightness 3s infinite alternate;
    -webkit-animation: lightness 3s infinite alternate;
}
@keyframes lightness {
    /*50%  = màu đỏ */
    50% {background-color: hsl(0, 100%, 50%); }
    /*100% = màu trắng */
    100% {background-color: hsl(0, 100%, 100%); }
}
 
@-webkit-keyframes lightness {
    /*50%  = màu đỏ */
    50% {background-color: hsl(0, 100%, 50%); }
    /*100% = màu trắng */
    100% {background-color: hsl(0, 100%, 100%); }
}
 
#topflat {
    color: #999;
    background-color: white;
    background-image: linear-gradient(rgba(0, 0, 0, 0), black);
    animation: topflat 3s infinite alternate;
    -webkit-animation: topflat 3s infinite alternate;
}
@keyframes topflat {
    100% {background-color: black;}
}
 
@-webkit-keyframes topflat {
    100% {background-color: black;}
}
 
#bottomflat {
    color: #999;
    background-color: black;
    background-image: linear-gradient(white, rgba(255, 255, 255, 0));
    animation: bottomflat 3s infinite alternate;
    -webkit-animation: bottomflat 3s infinite alternate;
}
@keyframes bottomflat {
    100% {background-color: white;}
}
 
@-webkit-keyframes bottomflat {
    100% {background-color: white;}
}

You can follow the color that I have done above or your creative way to have better effects.

Create the effect button gradient editing using CSS3

Create the effect button gradient editing using CSS3 Posted on 17-08-2015  Understanding CSS3 will help a lot for you to find a good job later. So today I would like to share with you a simple effect that CSS3 gives us, through this article, you will have a better understanding of how to use animation andkeyframes rule in CSS3. First, you should see the Demo section of this article, or direct download to your computer. 1.5/10 839

Comment:

To comment you must be logged in members.

Files with category

  • Instructions for installing and configuring Windows Live Mail on Windows 10 simple

    View: 2216    Download: 0   Comment: 0   Author: none  

    Instructions for installing and configuring Windows Live Mail on Windows 10 simple

    Category: References
    Fields: Other

    0/2 review
    Windows 10 pre-installed Mail application for managing personal email on the device. The latest version of this application but improved a lot and support other email accounts such as Gmail or Yahoo Mail but users almost no "salty" really with this...

  • Step by step instructions to create social networking buttons with CSS3

    View: 1672    Download: 0   Comment: 0   Author: none  

    Step by step instructions to create social networking buttons with CSS3

    Category: References
    Fields: Other

    0.75/6 review
    CSS3 help web designers have the ability to create buttons (buttons) very nice, today I will share with you two tips decoration for button in your web becomes radiant beauty that no need to use photoshop.

  • You should understand the CSS Box Shadow

    View: 1864    Download: 0   Comment: 0   Author: none  

    You should understand the CSS Box Shadow

    Category: References
    Fields: Other

    1.3181818181818/11 review
    Effects his shadow was introduced in the previous article, however, in this article, I will guide more specific about shadow attributes, you try it with anything. First we try to learn css following paragraph:

  • How to do button movement with beautiful CSS3

    View: 1542    Download: 0   Comment: 0   Author: none  

    How to do button movement with beautiful CSS3

    Category: References
    Fields: Other

    0/3 review
    Previously to create motion effects button, you must draw the button in photoshop, then switched to flash to make it possible to move. But now you need not spend too much time doing it, all because of the emergence of CSS3.

  • Create a dropdown menu with CSS3 effects with beautiful transtions

    View: 1813    Download: 0   Comment: 0   Author: none  

    Create a dropdown menu with CSS3 effects with beautiful transtions

    Category: References
    Fields: Other

    0.45/10 review
    More of the dropdown menu you want to introduce to you, this will have the effect menu transitions (converted background of menu background from pale to dark). This menu works well on browsers like FF, Chrome, Safary, but unfortunately did not work...

  • How to hack css for all browsers you should know

    View: 1478    Download: 0   Comment: 0   Author: none  

    How to hack css for all browsers you should know

    Category: References
    Fields: Other

    1.6875/8 review
    In the process of web design, which makes it the most headaches is how to design web pages that you can run on the browser. Especially when clients use the old as IE6 browser such. However, with this article, you will easily edit interface runs well...

  • Create Accordion with extremely beautiful CSS3

    View: 1819    Download: 0   Comment: 0   Author: none  

    Create Accordion with extremely beautiful CSS3

    Category: References
    Fields: Other

    0.9/5 review
    Accordion is a technique that helps you shortened the content that you want displayed on the website. It is often used for the display of submenus. In addition you can also use it for content, images. Before applying this procedure, you have to use...

  • Create the effect Hovercho images with Webkit and CSS3 is great

    View: 1553    Download: 0   Comment: 0   Author: none  

    Create the effect Hovercho images with Webkit and CSS3 is great

    Category: References
    Fields: Other

    1.125/4 review
    WebKit is one open source application framework provides the necessary components built one for your web browser. Along with CSS3, cả have contributed to very nice effect những previously only using JavaScript or JQuery thực beige.​

 
Newsletter Email

File suggestion for you

File top downloads

logo codetitle
Codetitle.com - library source code to share, download the file to the community
Copyright © 2015. All rights reserved. codetitle.com Develope by Vinagon .Ltd