Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何使图像响应引导,并在wordpress上使用它?_Php_Css_Wordpress_Twitter Bootstrap - Fatal编程技术网

Php 如何使图像响应引导,并在wordpress上使用它?

Php 如何使图像响应引导,并在wordpress上使用它?,php,css,wordpress,twitter-bootstrap,Php,Css,Wordpress,Twitter Bootstrap,我已经厌倦了使用bootstrap使WordPress的特色图像响应。使用引导使映像响应的方法是 <img src="..." class="img-responsive" alt="Responsive image"> 我厌倦了在wordpress中动态显示特色图像时使用这种方法 <img src="<?php the_post_thumbnail( 'jumbo_thumbnail'); ?>" class="img-responsive" alt="Re

我已经厌倦了使用bootstrap使WordPress的特色图像响应。使用引导使映像响应的方法是

<img src="..." class="img-responsive" alt="Responsive image">

我厌倦了在wordpress中动态显示特色图像时使用这种方法

<img src="<?php the_post_thumbnail( 'jumbo_thumbnail'); ?>" class="img-responsive" alt="Responsive image">
“class=“img responsive”alt=“responsive image”>

但是它不起作用。我知道如果我在那里放置链接而不是
,它会起作用。但是我动态地获取特征图像,而这种方法不起作用。

你很接近了。完全去掉你的
img
标记,然后使用以下方法:

<?php
the_post_thumbnail( 'jumbo_thumbnail', array(
    'alt' => 'Responsive image',
    'class' => 'img-responsive'
) );
?>

功能将为您输出
img
标签