为什么Textillate效果会从我的投资组合中的h3
标记中删除粗体格式,如何解决? https://codepen.io/Olliewe88/pen/pgmWor
$(function() {
$('h1').textillate();
$('h2').textillate({ in: {
effect: 'flip'
}
});
$('h3').textillate({ in: {
effect: 'rollIn'
}
});
$('h4').textillate({ in: {
effect: 'tada'
}
});
});

body {
margin-top: 50px;
background-color: #00ffff;
}
h2 {
font-family: Open Sans Condensed;
}
h4 {
font-family: Open Sans Condensed;
font-size: 20px;
}
.jumbotron {
background-color: #8f8f8f;
}

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lettering.js/0.7.0/jquery.lettering.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/textillate/0.4.0/jquery.textillate.js"></script>
<div class="container-fluid">
<h1 class="text-primary text-center">Martin Luther King
<h1>
<h2 class="text-center">"Life's most persistent and urgent question is, 'What are you doing for others?"</h2>
<div class="jumbotron">
<center>
<img class="img-responsive ialign=" middle " src="http://static6.businessinsider.com/image/54bc1ccbecad04fb41e364cc/the-most-iconic-parts-from-martin-luther-kings-i-have-a-dream-speech.jpg ">
</center>
<h3 class='tests'><ul>
<li><b>January 15 1929</b> Martin Luther King, Jr. is born in Atlanta, Georgia. </li> </ul></h3>
<h3><ul>
<li><b>June 1948</b> King graduates from Morehouse College in Atlanta </li> </ul></h3>
<h3><ul>
<li><b>September 1948 </b> King enrolls in Crozer Theological Seminary in Chester, Pennsylvania</li> </ul></h3>
<h3><ul>
<li><b>June 18 1953 </b> King marries Coretta Scott in Marion, Alabama</li> </ul></h3>
<h3><ul>
<li><b>December 1955 </b> King is elected the president of the Montgomery Improvement Association.</li> </ul></h3>
<h3><ul>
<li><b>January 30 1956 </b> King's house is bombed</li> </ul></h3>
<h3><ul>
<li><b>January 1957 </b> King is elected president of the Southern Christian Leadership Conference</li> </ul></h3>
<h3><ul>
<li><b>September 1958 </b> King's first book, "Stride Toward Freedom " is published.</li> </ul></h3>
<h3><ul>
<li><b>October 19, 1960 </b> King is arrested in Atlanta</li> </ul></h3>
<h3><ul>
<li><b>April 1963 </b> King is arrested in Birmingham, Alabama</li> </ul></h3>
<h2 class="text-center ">"Faith is taking the first step even when you don 't see the whole staircase"</h2>
<center><h4>I recommend you should <a target="_blank" href="https://en.wikipedia.org/wiki/Martin_Luther_King,_Jr.">click here to read more!</a></h4><center>
<p>Page coded by Oliver Webb, for a project at <a href="https://www.freecodecamp.com" target="_blank">FreeCodeCamp</a></p>
</div>
</div>
&#13;
答案 0 :(得分:0)
<h3>
中的您可以做的是不使用h3,自己定义文本字体,然后使用
.tests2 {
font-size: 1.17em;
}
.tests3 {
font-size: 1.17em;
font-weight: bold;
}
<h3 class='tests'>
<ul>
<li><b>January 15 1929</b> Martin Luther King, Jr. is born in Atlanta, Georgia. </li>
</ul>
</h3>
<div class='tests2'>
<ul>
<li><b>January 15 1929</b> Martin Luther King, Jr. is born in Atlanta, Georgia. </li>
</ul>
</div>
<div class='tests3'>
<ul>
<li><b>January 15 1929</b> Martin Luther King, Jr. is born in Atlanta, Georgia. </li>
</ul>
</div>
答案 1 :(得分:0)
在css文件中添加font-weight
h3 {
font-weight: bold;
}