Html+css实现带图标的控件

  1. </pre><pre name="code" class="html"><!DOCTYPE html>

    <html >

    <head>

    <title>按钮写法</title>

    <meta charset="UTF-8">

    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">

    <link rel="stylesheet" href="css/style.css">

    <style type="text/css">

    a:hover{text-decoration: none;}

    .btn{

    display: inline-block;

    margin-top: 10px;

    padding: 10px 24px;

    border-radius: 4px;

    #63b7ff;

    color: #fff;

    cursor: pointer;

    }

    .btn:hover{

    #99c6ff;

    }

    .inbtn{

    border: none;

    }

    .bubtn{

    border: none;

    }

    .btn{

    font-style: normal;

    }

    .bgbtn span{

    margin-left: 10px;

    padding-left: 20px;

    background: url(images/edit.png) left center no-repeat;

    }

    .bgbtn02 img{

    margin-bottom: -3px;

    margin-right: 10px;

    }

    </style>

    </head>

    <body>

    <!--<a>标签按钮-->

    <a href="" class="btn">a标签按钮</a>

    <!--<input>标签按钮-->

    <input class="inbtn btn" type="button" value="input标签按钮"/>

    <!--<button>标签按钮-->

    <button class="bubtn btn">button标签按钮</button>

    <!--任意标签按钮-->

    <i class="ibtn btn">i标签按钮</i>

    <!--带背景图标按钮-->

    <a href="" class="bgbtn btn">

    <span>带图标按钮</span>

    </a>

    <a href="" class="bgbtn02 btn">

    <img src="images/edit.png"/>带图标按钮

    </a>

    </body>

    </html>

原文链接:http://www.jb51.net/web/433202.html