【问题标题】:Images not rendering in ie8 which are provided through jquery and css通过 jquery 和 css 提供的未在 ie8 中呈现的图像
【发布时间】:2014-02-21 04:12:19
【问题描述】:
slider = {

    initializeWidget : function(parentNode, widgetModel)
    { 

  var slide = 

    '<style type="text/css">'+
   '.ui-slider {'+
    'position: relative;'+
    'text-align: right; '+
    'width: 575px;'+
    'margin:0px 0px 0px 0px'+
   '}'+
   '.ui-slider .ui-slider-innerBar{'+
    'height:16px;'+
    'width:575px;'+
     'margin:3px 0px 0px 0px;'+
    'background: url("desktopweb/images/slider_bg.png") no-repeat 0 0;'+
   '}'+
   '.ui-rangeSlider .ui-slider-handle{'+
    'z-index: 10;'+
    'width: 13px;'+
    'height: 20px;'+
    'border: 0px;'+
    'background: url("desktopweb/images/tooltip.png") no-repeat ;'+
   '}'+
   '.ui-slider .ui-slider-bar{'+
    'margin: 3px 0;'+
    'background: url("desktopweb/images/slider_bg_active.png") no-repeat 0 0;'+
    'background-position: left;'+
    'height:20px;'+
    'cursor:move;'+
    'cursor:grab;'+
    'cursor: -moz-grab;'+
   '}'+
   '.ui-slider-label{'+
    'margin:0 2px 2px;'+    
    'background: url("desktopweb/images/calendarbackground.png") no-repeat ;'+
    'background-repeat:no-repeat;'+
    'bottom:0px;'+
    'padding:6px 10px 15px;'+
    'cursor:col-resize;'+
   '}'+
  '</style>'+
  '<div id="slider1"></div>';

图像是通过使用图像的 url 点击它们来呈现的。 当图像 url 如上给出时,背景图像不会在 IE8 上呈现。 自定义小部件是用 JQuery 1.9.1 编写的。 请帮助解决这个问题。 提前致谢!! PS:没有显示错误,控制台中的文件夹中没有图像。

【问题讨论】:

  • 为什么在 jquery 中使用样式 css 。请将其设为外部 css
  • 谢谢老兄,成功了。这件事有什么解释吗?

标签: jquery css internet-explorer-8


【解决方案1】:

外部样式表是一个单独的文件,其中包含您的所有样式。 您在网页编码的头部链接到它。

【讨论】:

    猜你喜欢
    • 2013-01-31
    • 2012-07-03
    • 1970-01-01
    • 1970-01-01
    • 2013-09-07
    • 1970-01-01
    • 1970-01-01
    • 2014-03-26
    • 2021-11-13
    相关资源
    最近更新 更多