2 jackxiaochen Jackxiaochen 于 2014.12.19 22:25 提问

JavaScriptMP3播放器怎么修改尺寸,求大神
 这个JavaScript如何改播放器的尺寸?
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Music Player - CodePen</title>

<link rel="stylesheet" href="css/reset.css">

<link rel="stylesheet" href="css/style.css" media="screen" type="text/css" />

</head>

<body>

  <div class="music-player">
  <!--<div style="background-image: url(http://i.imgur.com/yqB0erk.jpg);" class="album"></div>-->

  <div class="info">
    <div class="left">
      <a href="javascript:;" class="icon-shuffle"></a>
      <a href="javascript:;" class="icon-heart"></a>
    </div>
    <div class="center">
    <div class="jp-playlist">
      <ul>
        <li></li>
      </ul>
    </div>

    </div>
    <div class="right">
      <a href="javascript:;" class="icon-repeat"></a>
      <a href="javascript:;" class="icon-share"></a>
    </div>

    <div class="progress jp-seek-bar">
      <span class="jp-play-bar" style="width: 0%"></span>
    </div>
  </div>

  <div class="controls">
    <div class="current jp-current-time">00:00</div>
    <div class="play-controls">
      <a href="javascript:;" class="icon-previous jp-previous" title="previous"></a>
      <a href="javascript:;" class="icon-play jp-play" title="play"></a>
      <a href="javascript:;" class="icon-pause jp-pause" title="pause"></a>
      <a href="javascript:;" class="icon-next jp-next" title="next"></a>
    </div>
    <div class="volume-level jp-volume-bar">
      <span class="jp-volume-bar-value" style="width: 0%"></span>
      <a href="javascript:;" class="icon-volume-up jp-volume-max" title="max volume"></a>
      <a href="javascript:;" class="icon-volume-down jp-mute" title="mute"></a>
    </div>
  </div>

  <div id="jquery_jplayer" class="jp-jplayer"></div>

</div>



<script src="js/jquery.min.js"></script>
<script src="js/jquery.jplayer.min.js"></script>
<script src="js/jplayer.playlist.min.js"></script>

<script src="js/index.js"></script>

</body>

</html>

3个回答

caozhy
caozhy   Ds   Rxr 2014.12.20 05:02

代码不全,不知道你的播放器怎么做的,如果是flash/wmp控件,直接改变width height就可以了。

Jackxiaochen
Jackxiaochen 我是从网上下载的,想放到我的网页里,但尺寸太大了,不知道怎么改
接近 3 年之前 回复
caozhy
caozhy   Ds   Rxr 2015.01.03 07:11

用IE F12看下css,定位到播放器,然后照着修改。

showbo
showbo   Ds   Rxr 2016.02.21 13:46

jplayer可以设置width,height的,你是不是配置为100%了

http://www.jplayer.org/latest/developer-guide/#jPlayer-option-size

Csdn user default icon
上传中...
上传图片
插入图片