标签 前端 下的文章



1.Nginx服务器配置:

location ^~/vue {
    alias /data/wwwroot/vue;
    index index.html;
    try_files $uri $uri/ /vue/index.html;
}

2.Apache服务器配置:

开启mod_rewrite模块,设置allowAllOveride All并在项目目录下创建.htaccess文件,内容如下:


  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /vue/index.html [L]

/**for FF/Chrome**/
.fix{
position:fixed;
top:100px;
left:200px;
}
/**for IE8、7、6**/
.ie-fix{
_position:absolute;
_clear:both;
_top:expression(eval(document.compatMode && document.compatMode=='CSS1Compat') ? documentElement.scrollTop +(documentElement.clientHeight-this.clientHeight) - 1 : document.body.scrollTop +(document.body.clientHeight-this.clientHeight) - 1);
}