为了账号安全,请及时绑定邮箱和手机立即绑定

这个点击为什么没停止播放

这个点击为什么没停止播放

慕先生4463397 2017-06-19 23:20:31
<!DOCTYPE html><html><head><meta charset="UTF-8"><meta name="description" content=""><meta name="keywords" content=""><title>Examples</title><style type="text/css">    *{margin: 0;padding: 0;}    a{text-decoration: none;color: #333;}    ul,li{list-style: none;}    body{font-size:16px; margin:14px;font-family: "微软雅黑";height:100%;width:100%;}    .box{width:730px;margin:0 auto;}    .box .box_img{width:100%;height:440px;background:url("images/bag.jpg") no-repeat;background-size:100% 100%}    .box .box_img img{display: block;margin: 200px auto;width: 400px;animation: play 1.2s infinite  alternate linear}        @keyframes play{            from{transform: scale(.8);}            to{transform: scale(1.0);}        }}    .box .text_img{width:100%;background:#FFFAF0;padding:10px ;padding-right:0px;}    .box .text_img .text{width:100%;position:relative}    .box .text_img .text{text-align:center;line-height:25px;}    .box .text_img .text h2 img{width: 363px;height: 291px;padding:20px 0px;}    .box .text_img .text .bor_h{width: 83%;border-top: 1px solid pink;display: inline-block;height: 1px;}    .box .text_img .text i{width: 14px;height: 14px;border-radius: 50%;display: inline-block;background: #EEE0E5;position: relative;top: 5px;left: 0px;}    .box .text_img .text .img_1 img{width:482px;height:1840px;margin-left:-180px;}    .box .text_img .text .img_2{position:absolute;right:10px;bottom:-15px;}    .box .text_img .text .img_2 img{width:156px;height:479px;}    .box .text_img .text h3{border:2px solid #2c5aad;}    .box .text_img .vido{width:100%;text-align:center;margin:100px auto;}    .box .text_img .vido span {letter-spacing: 0px;line-height: 1.6;box-sizing: border-box;background-color: rgb(61, 170, 214);}    .img_4 img{width:600px;height:470px;}    img_4{margin-top:90px;}embed{width:670px;}</style></head><body><audio src="mp3/1.mp3" autoplay controls ></audio>    <div class="box">        <div class="box_img">            <img src="images/2.jpg" />        </div>        <div class="text_img">            <div class="text">                          <div class="vido">                <span style="letter-spacing: 0px; line-height: 1.6; box-sizing: border-box; background-color: rgb(61, 170, 214);">【父亲】沙画 &nbsp;</span>                <div class="mp4">                    <embed wmode="direct" flashvars="vid=q0157us6bb8&amp;tpid=0&amp;showend=1&amp;showcfg=1&amp;searchbar=1&amp;pic=//shp.qpic.cn/qqvideo_ori/0/q0157us6bb8_496_280/0&amp;skin=http://imgcache.qq.com/minivideo_v1/vd/res/skins/TencentPlayerMiniSkin.swf&amp;shownext=1&amp;list=2&amp;autoplay=0" src="http://imgcache.qq.com/tencentvideo_v1/player/TPout.swf?max_age=86400&amp;v=20140714" quality="high" name="tenvideo_flash_player_1497879479640" id="tenvideo_flash_player_1497879479640" bgcolor="#000000" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" pluginspage="http://get.adobe.com/cn/flashplayer/" width="670px" align="middle" height="502px">                </div>                <div class="img_4"><img src="images/6.jpg">                <img src="images/7.png">                </div>            </div>        </div>    </div>    <script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>    <script type="text/javascript">    $("embed").click(function(){        //$("audio").css("src":" ");        alert(eee);    })            </script></body></html>
查看完整描述

2 回答

?
如果不能解决你的问题丶我会惭愧

TA贡献22条经验 获得超8个赞

音视频建议用audio,

audio有很多api,比如控制播放和暂停:pause和play;

静音:muted;

获取音视频时间长度:duration等等。    


查看完整回答
反对 回复 2017-07-14
?
后知后觉88

TA贡献39条经验 获得超10个赞


不是有paused  play这种方法吗?  就是用来暂停  播放的. 

查看完整回答
反对 回复 2017-06-20
  • 2 回答
  • 1 关注
  • 4300 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信