我对非常简单的事情有很大的疑问。我无法在div中更改背景的颜色。我正在使用bootstrap 3.3.7。有我的代码
#In:hover {
background-color: #2E2E2F;
}
#Up:hover{
background-color: aquamarine;
}
<div id="Signupin" class="col-xs-12 col-sm-6 col-md-4 container-fluid" style = "height: 70px; margin: 0px; padding: 0px;">
<div class="row" style=" height: 70px;">
<div id = "Sign" class = "col-xs-4 col-sm-4 col-md-4" style = "font-size:50px; text-align: center; height: 65px; background-color: white;">
<p style = "margin: 0px; padding: 0px;font-family: monospace;">Sign</p>
</div>
<!-- I would like to change background color of these two(Up and In) when the mouse is overlayed. -->
<a href="C:\FreeGuide\HTML_CSS\Sign Up\signup.html">
<div id = "Up" class = "col-xs-4 col-sm-4 col-md-4" style="height: 70px; text-align: center; background-color: #B7B7AC ">
<p style = "font-size: 50px; color: gainsboro;font-family: monospace;">Up</p>
</div>
</a>
<a>
<div id = "In" class = "col-xs-4 col-sm-4 col-md-4" style = "background-color: #0E2E2F;text-align: center; height: 70px;">
<p style = "font-size: 50px;font-family: monospace; color: gainsboro;">In</p>
</div>
</a>
</div>
</div>
您能告诉我问题出在哪里吗?谢谢。
答案 0 :(得分:1)
因为您曾经使用后台内联,但是需要使用内部CSS进行悬停,如下所示。
请参阅下面的内容:-
#In{background-color: #0E2E2F;}
#In:hover {
background-color: #2E2E2F;
}
#Up{ background-color: #B7B7AC }
#Up:hover{
background-color: aquamarine;
}
<div id="Signupin" class="col-xs-12 col-sm-6 col-md-4 container-fluid" style = "height: 70px; margin: 0px; padding: 0px;">
<div class="row" style=" height: 70px;">
<div id = "Sign" class = "col-xs-4 col-sm-4 col-md-4" style = "font-size:50px; text-align: center; height: 65px; background-color: white;">
<p style = "margin: 0px; padding: 0px;font-family: monospace;">Sign</p>
</div>
<!-- I would like to change background color of these two(Up and In) when the mouse is overlayed. -->
<a href="C:\FreeGuide\HTML_CSS\Sign Up\signup.html">
<div id = "Up" class = "col-xs-4 col-sm-4 col-md-4" style="height: 70px; text-align: center;">
<p style = "font-size: 50px; color: gainsboro;font-family: monospace;">Up</p>
</div>
</a>
<a>
<div id = "In" class = "col-xs-4 col-sm-4 col-md-4" style = "text-align: center; height: 70px;
">
<p style = "font-size: 50px;font-family: monospace; color: gainsboro;">In</p>
</div>
</a>
</div>
</div>
答案 1 :(得分:1)
使用from keras.models import load_model
with tf.Session(graph=K.get_session().graph) as session:
session.run(tf.global_variables_initializer())
model = load_model('model.h5')
predictions = model.predict(input)
覆盖内联样式
!important
#In:hover{
background: #2E2E2F!important;
}
#Up:hover{
background: aquamarine!important;
}
答案 2 :(得分:0)
只需为段落提供背景
#In p:hover {
background-color: #2E2E2F;
}
#Up p:hover{
background-color: aquamarine;
}
请不要将ID用于样式,它们用于javascript。除非您没有其他选择,否则请禁止使用!important
。