濮阳杆衣贸易有限公司

主頁 > 知識庫 > HTML5 Canvas圖像模糊完美解決辦法

HTML5 Canvas圖像模糊完美解決辦法

熱門標簽:鶴壁手機自動外呼系統(tǒng)怎么安裝 漳州人工外呼系統(tǒng)排名 中紳電銷智能機器人 威海營銷外呼系統(tǒng)招商 鄭州電銷外呼系統(tǒng)違法嗎 濟南辦理400電話 ai電銷機器人連接網關 農村住宅地圖標注 跟電銷機器人做同事

1、最近在用h5的canvas畫動畫,發(fā)現(xiàn)圖像特別模糊。后來終于找到罪魁禍首是<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>
                <!--標題-->
                <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;height:0.45rem;" id="closesuccess" onclick="closesuccess();" />
                    </div>
                    <div class="teamname">
                        <div class="teamnameitem"><p class="teamnameitemtop">{{eventDetail.HomeTeamName}}</p><br /><p class="teamnameitembottom">HOME</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">Match Odds</td>
                                    <td class="teamplaysselectionbottom" style="width:50%;" id="selectionname">Home</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%;" id="betmoneysuc">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">技術統(tǒng)計</p>
                </div>
            </div>
            <div class="downChangrTab quizGames" style="display: block;">
                <div id="ruleTypeItems" v-cloak>
                    <!--勝平負-->
                    <div class="diffPlaysTetx" v-for="(item,index) in eventDetail.Market" v-if="item.RuleType==100">
                        <span class="speciesName">賽果</span>
                        <span class="rotary" v-if="item.State!=1">(已封盤)</span>
                        <span class="speciesExp">猜90分鐘(含補時)兩隊的比賽結果</span>
                    </div>
                    <div v-for="(item,index) in eventDetail.Market" v-if="item.RuleType==100" id="result" 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,'賽果',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) in eventDetail.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) in 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) 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="diffPlaysTetx" v-for="(item,index) in eventDetail.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) in 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) 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="diffPlaysTetx" v-for="(item,index) in eventDetail.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) in 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) in 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) in 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,'下一進球',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="downChangrTab guessRecord">
                <div class="hide-body" id="dialogorders">
                    <div class="tableNameGuess">
                        <li>玩法</li>
                        <li>選項</li>
                        <li>賠率</li>
                        <li>本金</li>
                        <li>結果</li>
                    </div>
                    <ul style="background:#FFFFFF;height:4.79rem;overflow: scroll;">
                        <div class="guessedLists" id="contentOrders" v-for="(item,index) in orders">
                            <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'">訂單正常</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'">訂單被拒絕,投注延遲期間發(fā)生重要事件等原因</p>
                            </li>
                        </div>
                    </ul>
                </div>
            </div>
            <!--賽事事件-->
            <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 class="happenedMiddle_top" style="margin-top: 0.4rem;"></div>
                            </td>
                            <td></td>
                        </tr>
                    </table>
                    <table class="whatHappen" style="" v-for="(item,index) in cases" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td></td>
                            <td class="happenedMiddle">
                                <div class="happenedMiddle_line"></div>
                            </td>
                            <td></td>
                        </tr>
                        <tr v-if="item.CaseDescription.indexOf('主')>-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('主')<0 && item.CaseDescription.indexOf('主')<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>
            <!--技術統(tǒng)計-->
            <div class="downChangrTab" style="display: none;">
                <div class="skillInfoGaryBg" id="stutsskillsData">
                    <div class="skillInfo" v-for="(item, index) in skillsData">
                        <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" />
                <!--余額-->
                <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;">All <span style="margin-left: 0.05rem;">in</span></p>
                            <p id="allinvalue" style="height: 0.3rem;">100</p>
                        </li>
                    </ul>
                </div>
                <!--確定-->
                <p class="subSure subSureRed" style="text-align:center;" onclick="CreateOrder();" id="subSure">
                    確定
                </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 Canvas圖像模糊完美解決辦法,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對腳本之家網站的支持!

標簽:甘南 咸陽 惠州 蘇州 營口 文山 萍鄉(xiāng) 紅河

巨人網絡通訊聲明:本文標題《HTML5 Canvas圖像模糊完美解決辦法》,本文關鍵詞  HTML5,Canvas,圖像,模糊,完美,;如發(fā)現(xiàn)本文內容存在版權問題,煩請?zhí)峁┫嚓P信息告之我們,我們將及時溝通與處理。本站內容系統(tǒng)采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《HTML5 Canvas圖像模糊完美解決辦法》相關的同類信息!
  • 本頁收集關于HTML5 Canvas圖像模糊完美解決辦法的相關信息資訊供網民參考!
  • 推薦文章
    辛集市| 越西县| 绥德县| 武宁县| 昭苏县| 昂仁县| 乌什县| 阿坝| 永顺县| 华安县| 尼勒克县| 周至县| 集贤县| 辽阳县| 洞口县| 新民市| 清新县| 万州区| 彭阳县| 汕尾市| 澄迈县| 建德市| 崇左市| 察哈| 阳城县| 淳安县| 穆棱市| 瓦房店市| 含山县| 宝丰县| 武清区| 威宁| 从化市| 嘉禾县| 新密市| 卓资县| 海南省| 平乡县| 陈巴尔虎旗| 三穗县| 图木舒克市|