我想在我的Worpress帖子的標題上使用fittext,但它不工作。Fittext不能在WordPress上發佈帖子
HTML
<div class="row">
<div class="col-md-12 textFit">
<h2 id="fittext1"><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?></a></h2>
<?php the_category(', '); ?>
</div>
</div>
footer.php(輸出,JS通過功能帶來 - )
jquery
通過Wordpress
帶來的頭部(在functions.php
enquened)
<script type="text/javascript" src="http://localhost/wordpress/wp-content/themes/new/js/jquery.fittext.js"></script>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("#fittext1").fitText(1.8, { minFontSize: '90px', maxFontSize: '150px' });
});
</script>
css
article h2 > a {
font-size: 90px;
font-style: italic;
font-weight: 800;
line-height: 85px;
letter-spacing: -.075em;
color: #fff;
}
.textFit {
display: block
width: 100%;
}
你能提供什麼結果,你想實現更多的細節? – inquiryqueue
請檢查您的js路徑。這是對的嗎 ? –
Fittext是一個jQuery/javasript文件,允許大文本基本上響應。它隨着屏幕縮小/增長而縮小。而不是使用jquery的斷點。我只想要他們在他們的網站上展示的效果。 http://fittextjs.com(他們的主頁使用他們的功能) – user3550879