How to do button movement with beautiful CSS3

View: 1991    Dowload: 0   Comment: 0   Post by: hanhga   Category: References   Fields: Other

9 point/8 review File has been tested

Cách làm button chuyển động bằng CSS3

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.
Let's start step by step:

First download the pictures to the button:

                                                                                                                   

Step 1: HTML

You copy the html for examples, remember to pay attention to the class of the button, I use two different types of buttons, each with its own attributes and each button containing SPAN element

<div id="container">
<div>
<a href="#">
<span></span>
<span>Button #1</span>
<span></span>
</a>
<a href="#">
<span></span>
<span>Button #2</span>
<span></span>
</a>
<a href="#">
<span></span>
<span>Button #3</span>
<span></span>
</a>
<div style="clear:both"></div>

<a href="#">
<span>Join us</span>
<span><span>For a free</span></span>
<span></span>
</a>
<a href="#">
<span>Try to search</span>
<span><input type="text" /></span>
<span></span>
</a>
<a href="#">
<span>Subscribe</span>
<span><input type="text" /></span>
<span></span>
</a>
</div>
</div>

Step 2: CSS
And here is the entire paragraph css help you create dynamic buttons

/*buttons #1*/
.buttons {
overflow:hidden;
}
.but1{
border-radius:10px;
-moz-border-radius:10px;
-webkit-border-radius:10px;

box-shadow:0px 0px 7px rgba(0,0,0,0.4) inset, 0px 0px 0px 4px rgba(255,255,255,0.1);
-moz-box-shadow:0px 0px 7px rgba(0,0,0,0.4) inset, 0px 0px 0px 4px rgba(255,255,255,0.1);
-webkit-box-shadow:0px 0px 7px rgba(0,0,0,0.4) inset, 0px 0px 0px 4px rgba(255,255,255,0.1);

background-color:#f4f5fe;
display:block;
float:left;
margin:10px;
overflow:hidden;
padding:10px 15px;
position:relative;
text-decoration:none;

transition:all 0.5s ease-in-out;
-moz-transition:all 0.5s ease-in-out;
-o-transition:all 0.5s ease-in-out;
-webkit-transition:all 0.5s ease-in-out;
}
.but1 .icon{
background:transparent url(../images/download.png) no-repeat top left;
float:left;
height:32px;
width:45px;

transition:all 0.5s ease-in-out;
-moz-transition:all 0.5s ease-in-out;
-o-transition:all 0.5s ease-in-out;
-webkit-transition:all 0.5s ease-in-out;
}
.but1 .title{
font-size:18px;
color:#000;
display:block;
float:left;
font-weight:bold;
line-height:32px;
}
.but1 .icon2{
background:transparent url(../images/download2.png) no-repeat top left;
height:32px;
left:20px;
opacity:0;
position:absolute;
top:-15px;
width:32px;
}
.but1:hover{
background-color:#e3e3ff;

box-shadow:0px 0px 4px rgba(0,0,0,0.5) inset, 0px 0px 0px 4px rgba(51,51,204,0.5);
-moz-box-shadow:0px 0px 4px rgba(0,0,0,0.5) inset, 0px 0px 0px 4px rgba(51,51,204,0.5);
-webkit-box-shadow:0px 0px 4px rgba(0,0,0,0.5) inset, 0px 0px 0px 4px rgba(51,51,204,0.5);

-webkit-transition-delay: 0.5s;
-moz-transition-delay: 0.5s;
-o-transition-delay: 0.5s;
-ms-transition-delay: 0.5s;
transition-delay: 0.5s;
}
.but1:hover .icon{
transform:rotate(-90deg) scale(0.8);
-ms-transform:rotate(-90deg) scale(0.8);
-moz-transform:rotate(-90deg) scale(0.8);
-o-transform:rotate(-90deg) scale(0.8);
-webkit-transform:rotate(-90deg) scale(0.8);
}
.but1:active .icon{
opacity:0;
}
.but1:active .icon2{
opacity:1;
-webkit-animation:slideDown1 1.0s linear infinite;
-moz-animation:slideDown1 1.0s linear infinite;
animation:slideDown1 1.0s linear infinite;
}
.but1:active{
background-color:#c1c1ff;

box-shadow:0 2px 4px rgba(0, 0, 0, 0.5) inset, 0px 0px 0px 4px rgba(51,51,204,0.8);
-moz-box-shadow:0 2px 4px rgba(0, 0, 0, 0.5) inset, 0px 0px 0px 4px rgba(51,51,204,0.8);
-webkit-box-shadow:0 2px 4px rgba(0, 0, 0, 0.5) inset, 0px 0px 0px 4px rgba(51,51,204,0.8);
}

@keyframes slideDown1{
0% {
top: -30px;
}
100% {
top: 55px;
}
}
@-webkit-keyframes slideDown1{
0% {
top: -30px;
}
100% {
top: 55px;
}
}
@-moz-keyframes slideDown1{
0% {
top: -30px;
}
100% {
top: 55px;
}
}

/*buttons #2*/
.but2{
border-radius:15px;
-moz-border-radius:15px;
-webkit-border-radius:15px;
background-color:#99cc99;
float:left;
height:40px;
margin:10px;
overflow:hidden;
padding-left:20px;
position:relative;
text-decoration:none;

transition:all 0.5s linear;
-moz-transition:all 0.5s linear;
-o-transition:all 0.5s linear;
-webkit-transition:all 0.5s linear;
}
.but2 .title{
color:#000000;
display:block;
float:left;
font-size:18px;
font-weight:bold;
line-height:40px;

transition:all 0.2s linear;
-moz-transition:all 0.2s linear;
-o-transition:all 0.2s linear;
-webkit-transition:all 0.2s linear;
}
.but2 .extra{
background-color:#63707e;
color:#fff;
float:left;
font-size:18px;
line-height:40px;
opacity:0;
position:relative;
text-transform:uppercase;
width:0px;
transition:all 0.3s linear;
-moz-transition:all 0.3s linear;
-o-transition:all 0.3s linear;
-webkit-transition:all 0.3s linear;
}
.but2 .extra span, .but2 .extra input {
display:none;
}
.but2 .icon{
background:transparent url(../images/right.png) no-repeat center center;
float:left;
height:40px;
width:40px;

transition:all 0.3s linear;
-moz-transition:all 0.3s linear;
-o-transition:all 0.3s linear;
-webkit-transition:all 0.3s linear;
}
.but2:hover .extra span, .but2:hover .extra input{
display:inline-block;
}
.but2:hover .extra{
margin-left:10px;
opacity: 1;
padding-left:10px;
padding-right:10px;
text-align:center;
width:150px;
}
.but2:hover .icon{
transform:rotate(180deg);
-ms-transform:rotate(180deg);
-moz-transform:rotate(180deg);
-o-transform:rotate(180deg);
-webkit-transform:rotate(180deg);
}

Hopefully with the button as this will make your website look professional and beautiful. Good luck !

Note: This button can effect not run on all browsers, so you should consider before using.

How to do button movement with beautiful CSS3

How to do button movement with beautiful CSS3 Posted on 27-08-2015  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. 1.13/10 1991

Comment:

To comment you must be logged in members.

Files with category

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

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

    View: 3112    Download: 0   Comment: 0

    Category: References     Fields: Other

    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

    Step by step instructions to create social networking buttons with CSS3

    View: 2215    Download: 0   Comment: 0

    Category: References     Fields: Other

    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

    You should understand the CSS Box Shadow

    View: 2291    Download: 0   Comment: 0

    Category: References     Fields: Other

    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

    How to do button movement with beautiful CSS3

    View: 1991    Download: 0   Comment: 0

    Category: References     Fields: Other

    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

    Create a dropdown menu with CSS3 effects with beautiful transtions

    View: 2231    Download: 0   Comment: 0

    Category: References     Fields: Other

    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

    How to hack css for all browsers you should know

    View: 1850    Download: 0   Comment: 0

    Category: References     Fields: Other

    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

    Create Accordion with extremely beautiful CSS3

    View: 2317    Download: 0   Comment: 0

    Category: References     Fields: Other

    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

    Create the effect Hovercho images with Webkit and CSS3 is great

    View: 1979    Download: 0   Comment: 0

    Category: References     Fields: Other

    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.​

 
File suggestion for you
File top downloads
Codetitle.net - library source code to share, download the file to the community
Copyright © 2015. All rights reserved. codetitle.net Develope by Vinagon .Ltd