Пример кнопки CSS


.button {
    font-family: Helvetica, Arial, sans-serif;
    text-decoration: none;
    font-weight: bold;
    line-height: 1;
    color: white;
    text-shadow: 0 -1px 1px rgba(0,0,0,.3);
    -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.5), inset 0 1px 1px rgba(255,255,255,.5);
    -moz-box-shadow: 0 1px 2px rgba(0,0,0,.5), inset 0 1px 1px rgba(255,255,255,.5);
    -o-box-shadow: 0 1px 2px rgba(0,0,0,.5), inset 0 1px 1px rgba(255,255,255,.5);
    box-shadow: 0 1px 2px rgba(0,0,0,.5), inset 0 1px 1px rgba(255,255,255,.5);
}
.small, .normal, .medium, .big, .megabig {
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    -o-border-radius: 8px;
    border-radius: 8px;
    padding: 5px 10px;
}
.small {
    font-size: 11px;
}
.normal {
    font-size: 14px;
}
.medium {
    font-size: 18px;
}
.big {
    font-size: 24px;
}
.megabig {
    font-size: 32px;
}

/* Blue */
.blue {
    background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#52A8E8), to(#377AD0));
    background-image: -moz-linear-gradient(0% 100% 90deg, #377AD0, #52A8E8);
    background-color: #52A8E8;
    border: 1px solid #20559A;
}
.blue:hover, .blue:focus {
    background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#54A1D8), to(#1967CA));
    background-image: -moz-linear-gradient(0% 100% 90deg, #1967CA, #54A1D8);
    background-color: #52A8E8;
    color: white;
}
.blue:active {
    background: #2D7CD1;
    color: white;
}
/* Green */
.green {
    background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#21AE60), to(#2E8B57));
    background-image: -moz-linear-gradient(0% 100% 90deg, #2E8B57, #21AE60);
    background-color: #21AE60;
    border: 1px solid #21633D;
}
.green:hover, .green:focus {
    background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#21AE60), to(#28794B));
    background-image: -moz-linear-gradient(0% 100% 90deg, #28794B, #21AE60);
    background-color: #21AE60;
    color: white;
}
.green:active {
    background: #2B8452;
    color: white;
}
/* Black */
.black {
    background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#666), to(#000));
    background-image: -moz-linear-gradient(0% 100% 90deg, #000, #666);
    background-color: #666;
    border: 1px solid #444;
}
.black:hover, .black:focus {
    background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#444), to(#000));
    background-image: -moz-linear-gradient(0% 100% 90deg, #000, #444);
    background-color: #444;
    color: white;
}
.black:active {
    background: #555;
    color: white;
}
/* White */
.white {
    background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fafafa), to(#ccc));
    background-image: -moz-linear-gradient(0% 100% 90deg, #ccc, #fafafa);
    background-color: #ccc;
    border: 1px solid #A6A6A6;
	color: #333;
	text-shadow: 1px 1px 1px #fff;
}
.white:hover, .white:focus {
    background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#BCBCBC), to(#FCFCFC));
    background-image: -moz-linear-gradient(0% 100% 90deg, #FCFCFC, #BCBCBC);
    background-color: #BCBCBC;
    color: #555;
}
.white:active {
    background: #eee;
    color: #333;
}
/* Red */
.red {
    background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#BC1A02), to(#650500));
    background-image: -moz-linear-gradient(0% 100% 90deg, #650500, #BC1A02);
    background-color: #A60B00;
    border: 1px solid #6E0A01;
}
.red:hover, .red:focus {
    background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#D05F4E), to(#96514D));
    background-image: -moz-linear-gradient(0% 100% 90deg, #96514D, #D05F4E);
    background-color: #96514D;
    color: white;
}
.red:active {
    background: #96514D;
    color: white;
}
/* Orange */
.orange {
    background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#F06E24), to(#E04607));
    background-image: -moz-linear-gradient(0% 100% 90deg, #E04607, #F06E24);
    background-color: #E04607;
    border: 1px solid #C43C06;
}
.orange:hover, .orange:focus {
    background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#F59B66), to(#EA7D52));
    background-image: -moz-linear-gradient(0% 100% 90deg, #EA7D52, #F59B66);
    background-color: #EA7D52;
    color: white;
}
.orange:active {
    background: #D8744D;
    color: white;
}



Большая красная кнопка
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Кнопка CSS</title>
<style>
.button {
   border-top: 1px solid #f79a86;
   background: #ffb882;
   background: -webkit-gradient(linear, left top, left bottom, from(#d90707), to(#ffb882));
   background: -webkit-linear-gradient(top, #d90707, #ffb882);
   background: -moz-linear-gradient(top, #d90707, #ffb882);
   background: -ms-linear-gradient(top, #d90707, #ffb882);
   background: -o-linear-gradient(top, #d90707, #ffb882);
   padding: 20px 40px;
   -webkit-border-radius: 9px;
   -moz-border-radius: 9px;
   border-radius: 9px;
   -webkit-box-shadow: rgba(0,0,0,1) 0 1px 0;
   -moz-box-shadow: rgba(0,0,0,1) 0 1px 0;
   box-shadow: rgba(0,0,0,1) 0 1px 0;
   text-shadow: rgba(0,0,0,.4) 0 1px 0;
   color: white;
   font-size: 24px;
   font-family: Georgia, Serif;
   text-decoration: none;
   vertical-align: middle;
   }
.button:hover {
   border-top-color: #ff0000;
   background: #ff0000;
   color: #ffffff;
   }
.button:active {
   border-top-color: #ffffff;
   background: #ffffff;
   }
</style>
</head>
<body>
<p class="button" style="width:80px;">Кнопка
</body>
</html>
 

Оставьте комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *