CSS漂亮按钮(一)

这篇文章绘制了四个漂亮的按钮。

1.html部分



  
    CSS漂亮按钮
    
  
  
    
    
  

2.css部分

.buttons-wrapper {
    width: 400px;
    padding: 50px;
    background-color: yellow;
}

.buttons-discover {
    width: 400px;
    height: 65px;
    padding: 50px;
    background-color: green;
}

a.button {
    text-decoration: none;
    display: inline-block;
    line-height: 54px;
    color: white;
}

a {
    cursor: pointer;
    text-decoration: none;
}

.button {
    color: white;
    background: #10bbf1;
    height: 58px;
    border: 2px solid #10bbf1;
    font: 500 22px "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
    padding: 0 21px;
    transition: color 0.1s linear, background-color 0.1s linear, border-color 0.1s linear;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border-radius: 5px;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

.button:hover {
    background: #40c9f4;
    border-color: #40c9f4;
}

.button.button-stripe {
    background-color: rgba(0, 0, 0, 0.2);
    border-color: white;
}

.button.button-stripe:hover {
    color: #222222;
    background-color: white;
    border-color: white;
}

.button-download {
    height: 62px;
    float: left;
    font: 500 11px/13px "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
    padding-left: 61px;
    padding-right: 0;
    width: 180px;
    text-align: left;
    margin: 0 10px 20px;
    position: relative;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

.button-download-title {
    padding: 11px 0 1px;
    display: block;
    font-size: 11px;
    line-height: 13px;
    text-align: left;
}

.button-download-subtitle {
    display: block;
    font-size: 21px;
    line-height: 23px;
    text-align: left;
}

.button-download:after {
    content: "";
    position: absolute;
    left: 23px;
    top: 14px;
    width: 32px;
    height: 32px;
    background: url(../images/sprite.png) 0 0 no-repeat;
    background-position: -100px 0;
}

.button-download.android:after {
    background-position: -150px 0;
}

3.image部分


sprite.png

4.最后效果


button.PNG

你可能感兴趣的:(CSS漂亮按钮(一))