有人可以帮我找出为什么<h5>元素上的动画不起作用?
#hero h5 {
animation: fadein 2s;
-moz-animation: fadein 2s; /* Firefox */
-webkit-animation: fadein 2s; /* Safari and Chrome */
-o-animation: fadein 2s; /* Opera */
font-weight: strong;
font-size: 28px;
}Run Code Online (Sandbox Code Playgroud)
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<section id="hero">
<div class="content">
<div class="container">
<div class="row">
<h5>Lorem Ipsum Demo Title</h5>
</div><!-- row -->
</div> <!-- container -->
</div> <!-- content -->
</section><!-- section --> Run Code Online (Sandbox Code Playgroud)
我只是Bootstrap和Web Developing的新手,所以我的问题对于专家来说可能非常简单和有趣.滚动后如何在Bootstrap中更改Navbar-Brand Image?我有这个完美的工作JS:
$(window).scroll(function() {
if ($(".navbar").offset().top > 50) {
$('#custom-nav').addClass('affix');
$(".navbar-fixed-top").addClass("top-nav-collapse");
} else {
$('#custom-nav').removeClass('affix');
$(".navbar-fixed-top").removeClass("top-nav-collapse");
}
});
Run Code Online (Sandbox Code Playgroud)
但我无法理解滚动后我的品牌形象会如何变化?泰!
我有PHP代码(ACF Pro插件代码).如何将此代码插入我的Visual Composer?很长一段时间都找不到解决方案,但现在这对我来说至关重要.
<?php if( have_rows('add_a_new_table') ): ?>
<?php
while( have_rows('add_a_new_table') ):
the_row();
// vars
$t_title = get_sub_field('t_title');
$t_pricing = get_sub_field('t_pricing');
$t_emails_number = get_sub_field('t_emails_number');
?>
<div class="col-sm-12 col-sm-4 text-center">
<div class="courses-column">
<div class="courses-column-inner">
<h3><?php echo $t_title; ?></h3>
<p style="font-size: 24px;">
<?php echo $t_pricing; ?>
</p>
<br>
<p style="font-size: 16px;">
<?php echo $t_emails_number; ?>
</p>
</div>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
Run Code Online (Sandbox Code Playgroud)
由于if和while条件,我无法通过短代码实现它.行HTML和行JS对我来说也没用.
我无法解决鼠标悬停时图像抖动的问题。我有以下脚本:
function displayText(id)
{
var el = document.getElementById(id);
el.style.display = 'block';
}
function hideText(id)
{
var el = document.getElementById(id);
el.style.display = 'none';
}
Run Code Online (Sandbox Code Playgroud)
.btn {
margin-top: -90px;
z-index: 999999999;
position: absolute;
text-align: center;
background: #37a000;
displa: block;
}Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<a href='#' >
<img class="streamer_img" alt="example" src="https://placeimg.com/640/480/nature"
onmouseover="this.src='https://placeimg.com/640/480/people'; displayText('hiddentext')"
onmouseout="this.src='https://placeimg.com/640/480/nature'; hideText('hiddentext')" />
<p class="btn" id="hiddentext" style="display: none;">Watch/play</p>
</a>Run Code Online (Sandbox Code Playgroud)
一切都很好,但是当我将鼠标移到显示的“观看”文本上时,一切都开始摇晃。
我怎样才能解决这个麻烦呢?谢谢