2015-06-20 44 views
-3

我包括了bottstrap 3.3,但是在盘旋时我没有得到蓝色的光芒。只有在选择该字段时,我会看到蓝色突出显示的边框。我怎样才能达到蓝光作为悬停效果?如何在悬停在文本输入字段上时获得蓝光?

enter image description here

<!-- Latest compiled and minified CSS --> 
    <!-- Latest compiled and minified CSS --> 
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> 

    <!-- Optional theme --> 
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css"> 

    <!-- CSS INCLUDES: --> 
    <link href="/static/css/common_in.css?{{VERSION}}" rel="stylesheet" type="text/css"> 
    <link href="/static/css/list_in.css?{{VERSION}}" rel="stylesheet" type="text/css"> 
    <link href="/static/css/generic_in.css?{{VERSION}}" rel="stylesheet" type="text/css"> 
    <link href="/static/css/ai_in.css?{{VERSION}}" rel="stylesheet" type="text/css"> 
    <link href="/static/css/koolindex_in.css?{{VERSION}}" rel="stylesheet" type="text/css"> 

难道我重写的影响,如果我把下面我自己的CSS的引导代码会发生什么?这会工作吗?

回答

1

如果按F12在浏览器中,你可以看到CSS/HTML是怎么写的,通过这种方式,你可以找到“蓝辉光”的CSS:

border-color: rgba(82, 168, 236, 0.8); 
box-shadow: 0px 0px 8px rgba(82, 168, 236, 0.6); 

如果你有一个类,您可以为特定状态创建CSS:

.yourClass:focus{ background: #f00; } 
#yourId:hover{ background: #00f; } 

CSS将使用被发现为默认最后的CSS,但你也可以使用!important

.example{ color: #0f0 !important; } /* Will be used first */ 
.example{ color: #f00; } 
.example{ color: #00f; } /* Will be used if the first wouldn't have !important */ 

所以,如果你第一次加载你的CSS,然后引导CSS,Bootstrap将取代你的CSS,除非你使用!important。

使用google了解更多,searchwords:css states,css input,css box-shadow

相关问题