【问题标题】:Image isn't opening in expand mode in IE only仅在 IE 中无法以展开模式打开图像
【发布时间】:2020-07-18 14:40:55
【问题描述】:

Check out the picture please.
展开模式或最大化按钮被禁用,这仅在 IE 中发生。关于如何修复它的任何建议?下面是我的编码,我做错了吗?

sendImageDocsToHTML(imageDocuments) {
    var outerDiv = document.createElement("div");
    outerDiv.setAttribute("id","dtleImagesDiv");
    outerDiv.setAttribute("class","dtle");
    for(var x=0; x< imageDocuments.length; x++){
        var ele = document.createElement("img");
        ele.setAttribute("class", "image img-responsive");
        ele.setAttribute("src", imageDocuments[x].imageFullURL);
        outerDiv.appendChild(ele);
        outerDiv.appendChild(document.createElement("br"));
    }
    var divContent = outerDiv.outerHTML;
    var myWindow = this.nativeWindow.open('','','width=auto,height=1000px');
    var doc = myWindow.document;
    doc.open();
    this.translateService.get('document_images_window_header').subscribe(value => {
        doc.write('<html><head><title>' + value + '</title><link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"><link href="../assets/css/main.css" rel="stylesheet"><link rel="stylesheet" type="text/css" href="../assets/css/lotdisplay.css"></head><body><div class="container"><div class="col-sm-12 text-center">');
        doc.write(divContent);
        doc.write('</div></div></body></html>');
        doc.close();

【问题讨论】:

    标签: html css image expand expander


    【解决方案1】:

    看到您使用多个图像进行了测试,其中一些有效,这表明代码不太可能。看看第二个图像 URL 是否有问题。 IE 有开发者工具。看看你是否可以从它显示图像的尝试中获得任何诊断信息。

    浏览器具有不同的解码各种图像格式的能力。例如,WebP https://caniuse.com/#feat=webp 目前在 Edge、Firefox 和 Chrome 中支持,而在 IE 中不支持。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-07
      • 1970-01-01
      相关资源
      最近更新 更多