【问题标题】:Movie Trailer Api result id html not responsive output电影预告片 Api 结果 id html 不响应输出
【发布时间】:2015-05-20 08:04:06
【问题描述】:

http://trailerapi.com/api/api.php?user_trailer_limit=10&language=en 链接

$api_url_content='http://trailerapi.com/api/api.php?user_trailer_limit=10&language=en'; 
if(!$xml = simplexml_load_file($api_url_content))
{
echo “Error”;
}else
{

foreach( $xml as $film ) {
$movie_name= $film->name,
$movie_poster =$film->poster;
$movie_id=> $film->did;
$movie_description=$film->description;
$movie_year=$film->year;
$movie_producer=>$film->producer;
$movie_imdb=$film->imdb;
$movie_cast=$film->cast;
$movie_genre=$film->genre;
$movie_trailer='<iframe src=”http://www.dailymotion.com/embed/video    /’.$film->did.'” width=”720″ height=”480″ frameborder=”0″ allowfullscreen=”allowfullscreen”></iframe>';

INSERT INTO `trailer`.`trailers` (`id`, `name`, `description`, `poster`, `cast`,`embed`) 
 VALUES (NULL, '{$movie_name}', '{$movie_description}', 
'{$movie_poster}', '{$movie_cast}', '{$film->did}');
}

}

<?php $query=mysql_query("SELECT * FROM trailer Where id='{$_GET['id']}' Limit 1");
$fetch=mysql_fetch_array($query); ?>
<div style="width:100%">
<iframe src=”http://www.dailymotion.com/embed/video/<?php echo $embed; ?>” frameborder=”0″ 
allowfullscreen=”allowfullscreen”></iframe>
</div>

html 代码 div 响应且播放器不响应

如何响应式嵌入代码

输出:

<div style="width:100%">
<iframe src=”http://www.dailymotion.com/embed/video/ x2pgbqt” frameborder=”0″ 
allowfullscreen=”allowfullscreen”></iframe>
</div>

【问题讨论】:

    标签: php xml api responsive-design movie


    【解决方案1】:

    你的代码应该是这样的

    <iframe src="http://www.dailymotion.com/embed/video/x2pgbqt" frameborder=”0″ 
    allowfullscreen="allowfullscreen" width="100%"></iframe>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-04-13
      • 2015-09-06
      • 2019-08-25
      • 1970-01-01
      • 1970-01-01
      • 2015-09-07
      • 2018-08-24
      • 1970-01-01
      相关资源
      最近更新 更多