zoukankan      html  css  js  c++  java
  • 解决显示图片屏幕大小不一清晰度

    <html>
        <head>
            <title>{$this->title}</title>
        </head>
        <body>
            <body style="margin:0;padding:0;">
            <script type="text/javascript">
            {if:$this->img}
                var img_url = '{theme:user/img/mb/$this->img}?'+Date.parse(new Date());    
                var img = new Image();    
                img.src = img_url;    
                var check = function(){ };    
                var set = setInterval(check,40);    
                img.onload = function(){    
                    clearInterval(set);  
                    document.body.innerHTML +='<div class="picDialog" id="model_img" style=" 100%;height: '+img.height+';background: url('+img.src+') no-repeat center top;"></div>';
                    console.log(img.height);   
                };
            {/if}
            </script>
        </body>
    </html>
  • 相关阅读:
    Constructor构造方法
    overload重载
    static关键字
    this关键字
    继承
    ORACLE数据库 常用命令和Sql常用语句
    常见单词
    L贪心基础
    J贪心
    K贪心
  • 原文地址:https://www.cnblogs.com/Dong-Ge/p/6972219.html
Copyright © 2011-2022 走看看