Twitter Bootstrap 2-自定义按钮样式不起作用 [英] Twitter bootstrap 2 - custom button styling not working

查看:60
本文介绍了Twitter Bootstrap 2-自定义按钮样式不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用TB 2,并且正在尝试在CSS中创建新的按钮样式.这是我在CSS中使用的选择器模式:

I am using TB 2 and I am trying to create a new button style in CSS. This is the selector pattern I am using in my CSS:

.btn.btn-create { background-color: #D14836; color: #FFFFFF; }

我的HTML看起来像这样:

My HTML looks like this:

     <div id="page-right-column" class="span4">
        <div class="row-fluid">
            <div class="span12">
                <a href="#display-popup" class="btn btn-create pull-right" data-toggle="modal">Create New</a>

显示页面时,按钮颜色为灰色,并且仅当我将鼠标移到按钮上时,CSS中指定的颜色才会显示-我在做什么错了?

When the page is displayed, the button color is gray, and the color specified in the CSS is only displayed as I move the mouse over the button - what am I doing wrong?

如何使用CSS正确设置TB按钮的颜色?

How do I correctly style a TB button color with CSS?

推荐答案

使用

.btn.btn-create { 
    background-color: #D14836;
    color: #FFFFFF; 
    background-image: none; /* the background-image needs to be reset */
}

这篇关于Twitter Bootstrap 2-自定义按钮样式不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆