相关疑难解决方法(0)

HTML/CSS - 向按钮添加图标

我制作一些css按钮,我想在文本前添加一个图标,"按钮文字".

但我不知道我应该怎么做......

HTML <div class="btn btn_red"><a href="#">Crimson</a><span></span></div>

CSS

body {
    margin: 0;
    padding: 10px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 14px;
}
/* Glassy Buttons */
.btn {
    float: left;
    clear: both;
    background: url(imgs/button_left.png) no-repeat;
    padding: 0 0 0 10px;
    margin: 5px 0;
}
.btn a{
    float: left;
    height: 40px;
    background: url(imgs/button_middle.png) repeat-x left top;
    line-height: 40px;
    padding: 0 10px;
    color: #fff;
    font-size: 1em;
    text-decoration: none;
}
.btn span {
    background: url(imgs/button_right.png) no-repeat;
    float: left;
    width: 10px;
    height: 40px;
} …
Run Code Online (Sandbox Code Playgroud)

html css

11
推荐指数
4
解决办法
9万
查看次数

标签 统计

css ×1

html ×1