1

我注意到我的网站上的字体显示不清晰。这是由于javascript,但我找不到问题。有谁知道出了什么问题?

字体的边框不是直的。看起来像 cleartype 没有设置。问题出在 mu FF4 浏览器中。当 javascript 关闭(更少)时,字体粗细肯定是不同的。

编辑:我看到 Jquery 后台功能有什么问题。它会否决所有的 CSS 正文语句?有没有办法只将背景添加到身体?

$(document).ready(function() {   

 $.fn.smartBackgroundImage = function(url){
  var t = this;
  $('<img />')
    .attr('src', url)
    .load(function(){ 
       t.each(function(){ 
          $(this).css('background', '#16171e url('+url+') right bottom no-repeat fixed');
       });
    });
   return this;
 }

var viewportHeight = window.innerHeight ? window.innerHeight : $(window).height();
var viewportWidth = window.innerWidth ? window.innerWidth : $(window).width();
jQuery.post('/v3/ajax/portview.php', {height: viewportHeight, width: viewportWidth});

if (viewportWidth>950) {
 $('body').smartBackgroundImage('http://sionvalais.com/gfx/berge.jpg');
}

});
4

0 回答 0