1. 最近、h5 キャンバスを使用してアニメーションを描画していましたが、画像が特にぼやけていることがわかりました。その後、最終的に原因はコード <meta name=viewport content=width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no /> であることがわかりました。この行によりコードがスケーリングされます
2. 画像をぼかす効果:
3. 圧縮を解除した後の効果
コードは次のように変更できます
<!DOCTYPE html><html><head> <meta charset=utf-8 /> <meta name=viewport content=user-scalable=no /> <title>イベント詳細ページ</title> <script src=js/ rem.js type=text/javascript charset=utf-8></script> <link rel=stylesheet type=text/css href=css/m_reset.css /> <link rel=stylesheet type=text/css href=css/gameListsNew.css /> <link href=css/mask.css rel=stylesheet /></head><body> <div class=tipMask> <div class=tipBox> <img src=img/faileTip.png class=tipsImg /> <div class=fileBtn> <img src=img/fileBtn.png /> <span class=tryAgain>もう一度お試しください</span> </div> </div> </div> <div> <img src=img/whiteBack.png class=titleImg / > <div class=bgEvent id=contentbody> <div id=eventDetail v-cloak> <!--Title--> <div class=detailevent> <div class=titlevs> <img class=teamFlagLogo onerror=nofind(this); :src='img/teamlogonew/'+eventDetail.HomeTeamID+'.png' /> <div class=countryName> {{eventDetail.HomeTeamName}} </ div> </div> <div class=titlevs style=padding-top:0.3rem;> <div> <!--まだ開始されていません--> <!--<p class=theWorldCup>ワールドカップ</p>--> <p class=theGameNowDataTime>{{eventDetail.TimeFormat }}</p> <p class=gameBeginTime>{{getScoreOrVs(eventDetail.HomeTeamScore, eventDetail .AwayTeamScore)}}</p> </div> <!--開始期間--> <!--<div> <p>73:40</p> </div>--> </div> <div class=titlevs> <img class=teamFlagLogo onerror=nofind(this); :src='img/teamlogonew/'+eventDetail .AwayTeamID+'.png' /> <div class=countryName> {{eventDetail.AwayTeamName}} </div> </div> </div> <div id=ordersuccess class=ordersuccess> <div style=text-align:right;padding-top:0.2rem;padding-left:0.2rem;> <img src=img/ordersuccess/close.png style=width:0.45rem;高さ:0.45rem; id=closesuccess onclick=closesuccess() /> </div> <div class=teamname> <div class=teamnameitem><p class=teamnameitemtop>{{eventDetail.HomeTeamName}}</p><br /><p class=teamnameitembottom>ホーム</p></div> <div class=teamnameitem ><p class=teamnameitemmiddle>VS</p></div> <div class=teamnameitem><p class=teamnameitemtop>{{eventDetail.AwayTeamName}}</p><br /><p class=teamnameitembottom>AWAY</p></div> </div> <div class=teamdetail> <div class=teamdate><span>{{eventDetail.CompetitionName}}</span><span>/</span><span>{{eventDetail.DateFormat}}</span></div> <div class=teamplaysselection> <table style=width:100%;text-align:left;height:100%;> <tr> <td class=teamplaysselectiontop style=width:50%;>プレイ方法</td> <td class=teamplaysselectiontop style=width:50%;>オプション</td> </tr> <tr> <td class=teamplaysselectionbottom style=width:50 %; id=rulename>試合オッズ</td> <td class=teamplaysselectionbottom style=width:50%; id=selectionname>ホーム</td> </tr> </table> </div> <div class=teamwinmoney> <table style=width:90%;text-align:left;height:100%;> <tr > <td class=teamwinmoneytop style=width:50%;> プリンシパル</td> <td class=teamwinmoneytop style=width:50%;> オッズ</td> <td class=teamwinmoneytop style=width:50%;> 勝利前</td> </tr> <tr> <td class=teamwinmoneybottom style=width:50%>1000</td> <td class =teamwinmoneybottom style=width:50%; id=betodds>12.54</td> <td class=teamwinmoneybottom style=width:50%; id=betwin>12540</td> </tr> </table> </div> </div> </div> </div> <div> <div class= square id=square> <canvas id=courtCaseNew width=980 height=765></canvas> </div> <img src=img/balllittle.png style=width:20px;height:20px;display:none; id=imgballNew /> </div> <div class=middlechat> <div class=middleitem id=jcc> <p class=tabActive>ベッティング フィールド</p> </div> <div class=middleitem id=jcjl> <p class=tabCommon>ベッティング記録</p> </div> <div class=middleitem id=sssj> <p class=tabCommon>イベント</p> </div> <div class=middleitem id=jstj> <p class=tabCommon>技術統計</p> </div> </div div> <div class=downChangrTab quitGames style=display: block;> <div id=ruleTypeItems v-cloak> <!--勝ち、引き分け、負け--> <div class=diffPlaysTetx v-for=(item,index) (eventDetail.Market 内) v-if=item.RuleType==100> <span class=speciesName>結果</span> <span class=rotary v-if=item. !=1>(終了)</span> <span class=speciesExp>90 分間 (ロスタイム含む) で両チームの結果を予想してください</span> </div> <div v-for=(item,index) (eventDetail.Market 内) v-if=item.RuleType==100 id=result name=selectionItems class=result> <div v-bind:class=[(select.BackOdds<1.01 || item.State!=1) 'resuiteGray commonBorderGray':'resuite commonBorder'] v-for=(select,index) in item.Selection v-on:click=select.BackOdds>=1.01 &&clickFun($event,item.State,select.BackOdds,item.MarketId,select.SelectionId,'Result' , select.SelectionName); name=itemSelection> <p class=winEquLose v-bind:name='item'+item.MarketId>{{select.SelectionName}}</p> <p class=winEquLoseOdds v-bind:name='item'+item.MarketId> <span v-bind: id=item.MarketId+select.SelectionId v-bind:maxlimit=select.MaxStakeLimit>{{select.BackOdds}}</span> <img src=img/upIng.png style=width:0.2rem;display:none; v-bind:id='redOne' +item.MarketId+select.SelectionId /> <img src=img/downIng.png style=width:0.2rem;display:none; v-bind:id='greenOne'+item.MarketId+select.SelectionId /> </p> </div> </div> <!--奇数と偶数- - > <div class=diffPlaysTetx v-for=(item,index) ineventDetail.Market v-if=item.RuleType==130> <span class=speciesName>奇数と偶数</span> <span class=rotary v-if=item.State!=1>(終了)</span> <span class=speciesExp>90 分を推測します (停止時間を含む)ゲームの総ゴール数奇数および偶数</span> </div> <div id=oddeven v-for=(item,index) (eventDetail.Market) v-if=item.RuleType==130 name=selectionItems class=oddeven> <div v-bind:class=[(select.BackOdds<1.01 || item.State!=1) 'oddevenitemGray commonBorderGray':'oddevenitem commonBorder'] v-for=(select,index ) item.Selection v-on:click=select.BackOdds>=1.01 &&clickFun($event,item.State,select.BackOdds,item.MarketId,select.SelectionId,'奇数と偶数',select.SelectionName) name=itemSelection> <p class=winEquLose v-bind:name='item'+ item .MarketId v-bind:id='selectionname'+item.MarketId+select.SelectionId>{{select.SelectionName}}</p> <p class=winEquLoseOdds v-bind:name='item'+item.MarketId> <span v-bind:id=item.MarketId+select.SelectionId v-bind:maxlimit=select.MaxStakeLimit>{{select.BackOdds}}</span> <img src=img/upIng.png style=width:0.2rem;display:none; v-bind:id='redOne' +item.MarketId+select.SelectionId /> <img src=img/downIng.png style=width:0.2rem;display:none; v-bind:id='greenOne'+item.MarketId+select.SelectionId /> </p> </div> </div> <!--合計目標- - > <div class=diffPlaysTetx v-for=(item,index) ineventDetail.Market v-if=item.RuleType==410> <span class=speciesName>総ゴール数</span> <span class=rotary v-if=item.State!=1>(終了)</span> <span class=speciesExp>推定90分(ロス時間を含む) 総ゴール数試合中のゴール数</span> </div> <div id=totalGoals v-for=(item,index) (eventDetail.Market) v-if=item.RuleType==410 name=selectionItems class=totalGoals> <div v-bind:class=[(select.BackOdds<1.01 || item.State!=1) 'totalGoalitemGray commonBorderGray':'totalGoalitem commonBorder'] v-for=(select,index ) item.Selection v-on:click=select.BackOdds>=1.01 &&clickFun($event,item.State,select.BackOdds,item.MarketId,select.SelectionId,'Total Goals',select.SelectionName) name=itemSelection> <p class=winEquLose v-bind:name='item'+ item .MarketId v-bind:id='selectionname'+item.MarketId+select.SelectionId>{{select.SelectionName}}</p> <p class=winEquLoseOdds v-bind:name='item'+item.MarketId> <span v-bind:id=item.MarketId+select.SelectionId v-bind:maxlimit=select.MaxStakeLimit>{{select.BackOdds}}</span> <img src=img/upIng.png style=width:0.2rem;display:none; v-bind:id='redOne' +item.MarketId+select.SelectionId /> <img src=img/downIng.png style=width:0.2rem;display:none; v-bind:id='greenOne'+item.MarketId+select.SelectionId /> </p> </div> </div> <!--フルスコア- - > <div class=diffPlaysTetx v-for=(item,index) ineventDetail.Market v-if=item.RuleType==140> <span class=speciesName>フルタイムスコア</span> <span class=rotary v-if=item.State!=1>(終了)</span> <span class=speciesExp>推定90分(ロス時間を含む) フルスコア</span> </div> <div id=correctScoreHome v-for=(item,index) (eventDetail.Market) v-if=item.RuleType==140 name=selectionItems class=correctScoreHomeAway> <div v-bind:class=[(select.BackOdds<1.01 || item.State!=1) 'correctScoreitemGray commonBorderGray':'correctScoreitem commonBorder'] v-for=(select,index) in item ? .Selection v-on:click=select.BackOdds>=1.01 &&clickFun($event,item.State,select.BackOdds,item.MarketId,select.SelectionId,'フルスコア',select.SelectionName) name=itemSelection> <p class=winEquLose v-bind:name='item'+ item .MarketId v-bind:id='selectionname'+item.MarketId+select.SelectionId>{{select.SelectionName}}</p> <p class=winEquLoseOdds v-bind:name='item'+item.MarketId> <span v-bind:id=item.MarketId+select.SelectionId v-bind:maxlimit=select.MaxStakeLimit>{{select.BackOdds}}</span> <img src=img/upIng.png style=width:0.2rem;display:none; v-bind:id='redOne' +item.MarketId+select.SelectionId /> <img src=img/downIng.png style=width:0.2rem;display:none; v-bind:id='greenOne'+item.MarketId+select.SelectionId /> </p> </div> </div> <div class=downImg onclick=clickImg ()> <img src=img/toDown.png /> </div> <!--次の目標--> <div class=diffPlaysTetx v-for=(item,index) (eventDetail.Market 内) v-if=item.RuleType==350> <span class=speciesName>次の目標</span> <span class=rotary v-if=item.State != 1>(終了)</span> <span class=speciesExp>90 分 (ロスタイムを含む) 以内に次のゴールを決めるチームを当ててください</span> </div> <div id=nextgoal v-for=(item,index) (eventDetail.Market 内) v-if=item.RuleType==350 name=selectionItems class=result> <div v-bind:class=[(select.BackOdds<1.01 || item.State !=1) ? 'resutitemGray commonBorderGray':'resutitem commonBorder'] v-for=(select,index) in item.Selection v-on:click=select.BackOdds>=1.01 &&clickFun($event,item.State,select.BackOdds,item.MarketId,select.SelectionId,'Next Goal',select.SelectionName) name=itemSelection > < p class=winEquLose v-bind:name='item'+item.MarketId v-bind:id='selectionname'+item.MarketId+select.SelectionId>{{select.SelectionName}}</p> <p class=winEquLoseOdds v-bind:name='item'+item.MarketId> <span v-bind:id=item.MarketId+select.SelectionId v-bind:maxlimit=select.MaxStakeLimit>{{select.BackOdds}}</span> <img src=img/upIng.png style=width:0.2rem;display:none; v-bind:id='redOne' +item.MarketId+select.SelectionId /> <img src=img/downIng.png style=width:0.2rem;display:none; v-bind:id='greenOne'+item.MarketId+select.SelectionId /> </p> </div> <div class= style=width: 100%;height :0.45rem;></div> </div> <div class=perchDiv style=width: 100%;height:3rem;></div> </div> </div> <!--推測レコード--> <div class=downChangrTabguesRecord> <div class=hide-body id=dialogorders> <div class =tableNameGuess> <li>遊び方</li> <li>オプション</li> <li>オッズ</li> <li>ボーナス</li> <li>結果</li> </div> <ウルstyle=background:#FFFFFF;height:4.79rem;overflow:scroll;> <div class=guessedLists id=contentOrders v-for=(item,index) in order> <li> {{item.MarketName}} </li > <li> {{item.SelectionName}} </li> <li> {{item.FillPrice}} </li> <li> {{item.FillAmount}} </li> <li> <p v-if=item.Status == '0'> 確認待ち</p> <p v-else-if=item.Status == '1 '>注文OK</p> <p v-else-if=item.Status == '2'>{{item.NetReturn}}</p> <p v-else-if=item.Status == '3'>注文はキャンセルされました</p> <p v-else-if=item.Status == '4'>注文は無効です</p> <p v-else=item.Status = = '5 '>注文が拒否された、賭けの遅延期間中に重要なイベントが発生したなど。</p> </li> </div> </ul> </div> </div> <!--Event events--> <div class =downChangrTab style=display: none; v-if=> <div class=login-body id=contentCases> <table class=whatHappen v-if=cases.length >0> <tr> <td></td> <td class=happenedMiddle> <div クラス=happenedMiddle_top style=margin-top: 0.4rem;></div> </td> <td></td> </tr> </table> <table class=whatHappen style= v-for=(item,index) (ケースの場合) border=0 cellpacing=0 cellpadding=0> <tr> <td></td> <td class=happenedMiddle> <div class=happenedMiddle_line></div> < /td> <td></td> </tr> <tr v-if=item.CaseDescription.indexOf('main')>-1> <td class=eventsHappendLeft_things> <div class=eventsText> <p class=eventsTextLeft_time>{{item.CaseMinutes}}'</p> <p class=eventsTextLeft_ Country>{{item.CaseDescription}}</p> </div> < /td> <td class=happenedMiddle> <div class=eventsHappend_img> <img :src=GetMatchEventImg(item.CaseDescription) /> </div> </td> <td></td> </tr> <tr v-if=item.CaseDescription.indexOf('客')>- 1> <td></td> <td class=happenedMiddle> <div class=eventsHappend_img> <img :src=GetMatchEventImg(item.CaseDescription) /> </div> </td> <td class=eventsHappendRight_things> <div class=eventsText> <p class=eventsTextRight_ Country>{{item.CaseDescription}}</p> <p class=eventsTextRight_time>{{item.CaseMinutes}}'</p> </div> </td> </tr> <tr v-if=item.CaseDescription.indexOf('main')<0 && item.CaseDescription.indexOf('main')<0> <td></td > <td> <a class=ti tlefoc>{{item.CaseMinutes}}'</a> <a class=titlefoc>{{item.DesChina}}</a> </td> <td></td> </tr> </table> <table class=whatHappen v-if=cases.length >0> <tr> <td></td> <td class=happenedMiddle> <div class=happenedMiddle_line></div> <div class=happenedMiddle_top></div> </td> <td></td> </tr> </table> <!--<div style=width: 100%; height: 2.7rem;></div>--> </div> </div> <!--技術統計--> <div class=downChangrTab style=display: none;> < div class=skillInfoGaryBg id=stutsskillsData> <div class=skillInfo v-for=(item,index) in skillData> <li class=shotsOnTargets> <div class=shotsOnTargets_left> <p class=skillsTextFonts>{{item.AwayTeamValue}}</p> <div class=sotl_bg> <div class=sotl_bgProgress></div> </div> </div > <div class=shotsOnTargets_middle> <img :src=GetMatchStatsImage(item.StatsType) /> <p class=shills_name>{{item.StatsType}}</p> </div> <div class=shotsOnTargets_right> <p class=skillsTextFonts>{{item.HomeTeamValue} }</p> <div class=sotl_bg> <div class=sotl_bgProgress></div> </div> </div> </li> </div> </div> </div> </div> <!--下位順--> <div class=buttomOrder> <!--金額入力 - -> <!--賭け金--> <div class=aboutMoney> <input type=text name= id=betmoney class=gussMoney value=賭け金 placeholder= readonly=readonly v-model=gussMoney /> <img src=img/clearBetMoney.png class=clearGussMoney id=clearGussMoney /> <!--Balance--> <span class=balanceMoney id=minemoney>残高: 888</span> <!--ベット額 -- > <div class=diffGussMoney style=text-align:center;> <ul> <li name=bettingmoney class=difGuMonCom val=100>+100</li> <li name=bettingmoney class=difGuMonCom val=500>+500</li> <li name=bettingmoney class=difGuMonCom val=1000>+1000</li> <li class= difGuMonCom id=allin style=line-height: 0.5rem;> <p style=height: 0.3rem;>すべて<span style=margin-left: 0.05rem;>内</span></p> <p id=allinvalue style=height: 0.3rem;>100</p> </li> </ p> ul> </div> <!--OK--> <p class=subSure subSureRed style=text-align:center; onclick=CreateOrder(); id=subSure> OK</p> </div> </div> <!-- 順序付けが成功した後にレイヤーをマスクします--> <div id=overlay class=overlay></div> </div> <div > < img src=img/goal/goalball.png /> <img src=img/goal/goal.png /> <img src=img/goal/fireworks.png /> </div> <script src=js/jquery-1.10.2.min.js type=text/javascript charset=utf-8></script> <script src=js/vue.min.js type=text/javascript charset=utf-8></script> <script src=js/common.js?ver=012902 type=text/javascript charset=utf-8></script> <script src=js/jquery.cookie.min.js></script> <script src=js/mask.js?ver=012901></script> <script type= text/javascript src=js/eventDetailsNew.js?ver=012908></script> <script src=../js/animation.js></script></body></html>要約する上記は、エディターが紹介した HTML5 キャンバス画像のぼかしに対する完璧な解決策です。ご質問があれば、メッセージを残してください。編集者がすぐに返信します。また、VeVb武道サイトを応援してくださった皆様、誠にありがとうございました!